66 pull_request :
77
88env :
9+ # https://github.com/actions/setup-go#supported-version-syntax
10+ # ex:
11+ # - 1.18beta1 -> 1.18.0-beta.1
12+ # - 1.18rc1 -> 1.18.0-rc.1
913 GO_VERSION : ' 1.23.0-rc.1'
1014
1115jobs :
1216 # Check if there is any dirty change for go mod tidy
1317 go-mod :
1418 runs-on : ubuntu-latest
1519 steps :
16- - name : Install Go
17- uses : actions/setup-go@v5
20+ - uses : actions/checkout@v4
21+ - uses : actions/setup-go@v5
1822 with :
19- # https://github.com/actions/setup-go#supported-version-syntax
20- # ex:
21- # - 1.18beta1 -> 1.18.0-beta.1
22- # - 1.18rc1 -> 1.18.0-rc.1
2323 go-version : ${{ env.GO_VERSION }}
24- - name : Checkout code
25- uses : actions/checkout@v4
2624 - name : Check go mod
2725 run : |
2826 go mod tidy
3533 runs-on : ubuntu-latest
3634 steps :
3735 - uses : actions/checkout@v4
38- - name : Install Go
39- uses : actions/setup-go@v5
36+ - uses : actions/setup-go@v5
4037 with :
4138 # https://github.com/actions/setup-go#supported-version-syntax
4239 # ex:
5350 runs-on : windows-latest
5451 steps :
5552 - uses : actions/checkout@v4
56- - name : Install Go
57- uses : actions/setup-go@v5
53+ - uses : actions/setup-go@v5
5854 with :
59- # https://github.com/actions/setup-go#supported-version-syntax
60- # ex:
61- # - 1.18beta1 -> 1.18.0-beta.1
62- # - 1.18rc1 -> 1.18.0-rc.1
6355 go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
6456 - name : Run tests
6557 run : make.exe test
6961 runs-on : macos-latest
7062 steps :
7163 - uses : actions/checkout@v4
72- - name : Install Go
73- uses : actions/setup-go@v5
64+ - uses : actions/setup-go@v5
7465 with :
75- # https://github.com/actions/setup-go#supported-version-syntax
76- # ex:
77- # - 1.18beta1 -> 1.18.0-beta.1
78- # - 1.18rc1 -> 1.18.0-rc.1
7966 go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
8067 - name : Run tests
8168 run : make test
@@ -90,37 +77,22 @@ jobs:
9077 - ' 1.23.0-rc.1'
9178 steps :
9279 - uses : actions/checkout@v4
93- - name : Install Go
94- uses : actions/setup-go@v5
80+ - uses : actions/setup-go@v5
9581 with :
96- # https://github.com/actions/setup-go#supported-version-syntax
97- # ex:
98- # - 1.18beta1 -> 1.18.0-beta.1
99- # - 1.18rc1 -> 1.18.0-rc.1
10082 go-version : ${{ matrix.golang }}
101- - uses : actions/cache@v4
102- with :
103- path : ~/go/pkg/mod
104- key : ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('**/go.sum') }}
105- restore-keys : |
106- ${{ runner.os }}-go-${{ matrix.golang }}-
10783 - name : Run tests
10884 run : make test
10985
86+ # Checks: GitHub action assets
11087 check_generated :
11188 needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
11289 runs-on : ubuntu-latest
11390 steps :
11491 - uses : actions/checkout@v4
115- - name : Unshallow
116- run : git fetch --prune --unshallow
117- - name : Install Go
118- uses : actions/setup-go@v5
11992 with :
120- # https://github.com/actions/setup-go#supported-version-syntax
121- # ex:
122- # - 1.18beta1 -> 1.18.0-beta.1
123- # - 1.18rc1 -> 1.18.0-rc.1
93+ fetch-depth : 0
94+ - uses : actions/setup-go@v5
95+ with :
12496 go-version : ${{ env.GO_VERSION }}
12597 - name : Check generated files are up to date
12698 run : make fast_check_generated
@@ -145,13 +117,8 @@ jobs:
145117 runs-on : ubuntu-latest
146118 steps :
147119 - uses : actions/checkout@v4
148- - name : Install Go
149- uses : actions/setup-go@v5
120+ - uses : actions/setup-go@v5
150121 with :
151- # https://github.com/actions/setup-go#supported-version-syntax
152- # ex:
153- # - 1.18beta1 -> 1.18.0-beta.1
154- # - 1.18rc1 -> 1.18.0-rc.1
155122 go-version : ${{ env.GO_VERSION }}
156123 - name : Build golangci-lint
157124 run : make build
0 commit comments