6
6
pull_request :
7
7
8
8
env :
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
9
13
GO_VERSION : ' 1.23.0-rc.1'
10
14
11
15
jobs :
12
16
# Check if there is any dirty change for go mod tidy
13
17
go-mod :
14
18
runs-on : ubuntu-latest
15
19
steps :
16
- - name : Install Go
17
- uses : actions/setup-go@v5
20
+ - uses : actions/checkout@v4
21
+ - uses : actions/setup-go@v5
18
22
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
23
23
go-version : ${{ env.GO_VERSION }}
24
- - name : Checkout code
25
- uses : actions/checkout@v4
26
24
- name : Check go mod
27
25
run : |
28
26
go mod tidy
35
33
runs-on : ubuntu-latest
36
34
steps :
37
35
- uses : actions/checkout@v4
38
- - name : Install Go
39
- uses : actions/setup-go@v5
36
+ - uses : actions/setup-go@v5
40
37
with :
41
38
# https://github.com/actions/setup-go#supported-version-syntax
42
39
# ex:
53
50
runs-on : windows-latest
54
51
steps :
55
52
- uses : actions/checkout@v4
56
- - name : Install Go
57
- uses : actions/setup-go@v5
53
+ - uses : actions/setup-go@v5
58
54
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
63
55
go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
64
56
- name : Run tests
65
57
run : make.exe test
69
61
runs-on : macos-latest
70
62
steps :
71
63
- uses : actions/checkout@v4
72
- - name : Install Go
73
- uses : actions/setup-go@v5
64
+ - uses : actions/setup-go@v5
74
65
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
79
66
go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
80
67
- name : Run tests
81
68
run : make test
@@ -90,37 +77,22 @@ jobs:
90
77
- ' 1.23.0-rc.1'
91
78
steps :
92
79
- uses : actions/checkout@v4
93
- - name : Install Go
94
- uses : actions/setup-go@v5
80
+ - uses : actions/setup-go@v5
95
81
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
100
82
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 }}-
107
83
- name : Run tests
108
84
run : make test
109
85
86
+ # Checks: GitHub action assets
110
87
check_generated :
111
88
needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
112
89
runs-on : ubuntu-latest
113
90
steps :
114
91
- uses : actions/checkout@v4
115
- - name : Unshallow
116
- run : git fetch --prune --unshallow
117
- - name : Install Go
118
- uses : actions/setup-go@v5
119
92
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 :
124
96
go-version : ${{ env.GO_VERSION }}
125
97
- name : Check generated files are up to date
126
98
run : make fast_check_generated
@@ -145,13 +117,8 @@ jobs:
145
117
runs-on : ubuntu-latest
146
118
steps :
147
119
- uses : actions/checkout@v4
148
- - name : Install Go
149
- uses : actions/setup-go@v5
120
+ - uses : actions/setup-go@v5
150
121
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
155
122
go-version : ${{ env.GO_VERSION }}
156
123
- name : Build golangci-lint
157
124
run : make build
0 commit comments