-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Test
on:
workflow_dispatch:
workflow_run:
workflows: [ "Release" ]
types:
- completed
defaults:
run:
shell: bash
jobs:
test:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: true
matrix:
platform: [ ubuntu-latest, windows-latest, windows-2019, macos-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Download Go tip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download ${{ matrix.platform }} --repo grafana/gotip --pattern 'go.zip'
- name: Install Go tip
run: |
set -x
unzip go.zip -d $HOME/sdk
echo "GOROOT=$HOME/sdk/gotip" >> "$GITHUB_ENV"
echo "GOPATH=$HOME/go" >> "$GITHUB_ENV"
echo "$HOME/go/bin" >> "$GITHUB_PATH"
echo "$HOME/sdk/gotip/bin" >> "$GITHUB_PATH"
- name: Test Go
run: |
set -x
echo "$PATH"
which go
go_version_output=$(go version)
echo "$go_version_output"
if ! echo "$go_version_output" | grep -q "go version devel"; then
echo "Go version is not devel"
exit 1
fi