1
- ---
2
1
name : CI
3
2
on :
4
3
push :
5
- tags :
6
- - v*
7
4
branches :
8
5
- master
9
6
pull_request :
7
+
8
+ env :
9
+ GO_VERSION : 1.17
10
+
10
11
jobs :
11
12
# Check if there any dirty change for go mod tidy
12
13
go-mod :
15
16
- name : Install Go
16
17
uses : actions/setup-go@v2
17
18
with :
18
- go-version : 1.17
19
+ go-version : ${{ env.GO_VERSION }}
19
20
- name : Checkout code
20
21
uses : actions/checkout@v2
21
22
- name : Check go mod
29
30
runs-on : ubuntu-latest
30
31
steps :
31
32
- uses : actions/checkout@v2
33
+ - name : Install Go
34
+ uses : actions/setup-go@v2
35
+ with :
36
+ go-version : ${{ env.GO_VERSION }}
32
37
- name : lint
33
- uses : golangci/golangci-lint-action@v2.5.2
38
+ uses : golangci/golangci-lint-action@v3.1.0
34
39
with :
35
40
version : latest
36
41
# skip cache because of flaky behaviors
@@ -45,10 +50,11 @@ jobs:
45
50
- name : Install Go
46
51
uses : actions/setup-go@v2
47
52
with :
48
- go-version : 1.17 # test only the latest go version to speed up CI
53
+ go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
49
54
- name : Run tests
50
55
run : make.exe test
51
56
continue-on-error : true
57
+
52
58
tests-on-macos :
53
59
needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
54
60
runs-on : macos-latest
57
63
- name : Install Go
58
64
uses : actions/setup-go@v2
59
65
with :
60
- go-version : 1.17 # test only the latest go version to speed up CI
66
+ go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
61
67
- name : Run tests
62
68
run : make test
69
+
63
70
tests-on-unix :
64
71
needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
65
72
runs-on : ubuntu-latest
82
89
${{ runner.os }}-go-${{ matrix.golang }}-
83
90
- name : Run tests
84
91
run : make test
92
+
85
93
check_generated :
86
94
needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
87
95
runs-on : ubuntu-latest
95
103
- name : Install Go
96
104
uses : actions/setup-go@v2
97
105
with :
98
- go-version : 1.17
106
+ go-version : ${{ env.GO_VERSION }}
99
107
- name : Check generated files are up to date
100
108
run : make fast_check_generated
0 commit comments