1- ---
21name : CI
32on :
43 push :
5- tags :
6- - v*
74 branches :
85 - master
96 pull_request :
7+
8+ env :
9+ GO_VERSION : 1.17
10+
1011jobs :
1112 # Check if there any dirty change for go mod tidy
1213 go-mod :
1516 - name : Install Go
1617 uses : actions/setup-go@v2
1718 with :
18- go-version : 1.17
19+ go-version : ${{ env.GO_VERSION }}
1920 - name : Checkout code
2021 uses : actions/checkout@v2
2122 - name : Check go mod
2930 runs-on : ubuntu-latest
3031 steps :
3132 - uses : actions/checkout@v2
33+ - name : Install Go
34+ uses : actions/setup-go@v2
35+ with :
36+ go-version : ${{ env.GO_VERSION }}
3237 - name : lint
33- uses : golangci/golangci-lint-action@v2.5.2
38+ uses : golangci/golangci-lint-action@v3.1.0
3439 with :
3540 version : latest
3641 # skip cache because of flaky behaviors
@@ -45,10 +50,11 @@ jobs:
4550 - name : Install Go
4651 uses : actions/setup-go@v2
4752 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
4954 - name : Run tests
5055 run : make.exe test
5156 continue-on-error : true
57+
5258 tests-on-macos :
5359 needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
5460 runs-on : macos-latest
5763 - name : Install Go
5864 uses : actions/setup-go@v2
5965 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
6167 - name : Run tests
6268 run : make test
69+
6370 tests-on-unix :
6471 needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
6572 runs-on : ubuntu-latest
8289 ${{ runner.os }}-go-${{ matrix.golang }}-
8390 - name : Run tests
8491 run : make test
92+
8593 check_generated :
8694 needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
8795 runs-on : ubuntu-latest
95103 - name : Install Go
96104 uses : actions/setup-go@v2
97105 with :
98- go-version : 1.17
106+ go-version : ${{ env.GO_VERSION }}
99107 - name : Check generated files are up to date
100108 run : make fast_check_generated
0 commit comments