6
6
pull_request :
7
7
8
8
env :
9
- GO_VERSION : ' 1.22'
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
13
+ GO_VERSION : ' 1.23'
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,14 +33,15 @@ jobs:
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:
43
40
# - 1.18beta1 -> 1.18.0-beta.1
44
41
# - 1.18rc1 -> 1.18.0-rc.1
45
- go-version : ${{ env.GO_VERSION }}
42
+ # TODO(ldez) must be changed after the first release of golangci-lint with go1.23
43
+ # go-version: ${{ env.GO_VERSION }}
44
+ go-version : ' 1.22'
46
45
- name : lint
47
46
48
47
with :
53
52
runs-on : windows-latest
54
53
steps :
55
54
- uses : actions/checkout@v4
56
- - name : Install Go
57
- uses : actions/setup-go@v5
55
+ - uses : actions/setup-go@v5
58
56
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
57
go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
64
58
- name : Run tests
65
59
run : make.exe test
69
63
runs-on : macos-latest
70
64
steps :
71
65
- uses : actions/checkout@v4
72
- - name : Install Go
73
- uses : actions/setup-go@v5
66
+ - uses : actions/setup-go@v5
74
67
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
68
go-version : ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
80
69
- name : Run tests
81
70
run : make test
@@ -86,43 +75,27 @@ jobs:
86
75
strategy :
87
76
matrix :
88
77
golang :
89
- - ' 1.21'
90
78
- ' 1.22'
79
+ - ' 1.23'
91
80
steps :
92
81
- uses : actions/checkout@v4
93
- - name : Install Go
94
- uses : actions/setup-go@v5
82
+ - uses : actions/setup-go@v5
95
83
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
84
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
85
- name : Run tests
108
86
run : make test
109
87
88
+ # Checks: GitHub action assets
110
89
check_generated :
111
- needs : golangci-lint # run after golangci-lint action to not produce duplicated errors
112
90
runs-on : ubuntu-latest
113
91
steps :
114
92
- uses : actions/checkout@v4
115
- - name : Unshallow
116
- run : git fetch --prune --unshallow
117
- - name : Install Go
118
- uses : actions/setup-go@v5
119
93
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
94
+ fetch-depth : 0
95
+ - uses : actions/setup-go@v5
96
+ with :
124
97
go-version : ${{ env.GO_VERSION }}
125
- - name : Check generated files are up to date
98
+ - name : Check generated files are up-to- date
126
99
run : make fast_check_generated
127
100
env :
128
101
# needed for github-action-config.json generation
@@ -145,13 +118,8 @@ jobs:
145
118
runs-on : ubuntu-latest
146
119
steps :
147
120
- uses : actions/checkout@v4
148
- - name : Install Go
149
- uses : actions/setup-go@v5
121
+ - uses : actions/setup-go@v5
150
122
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
123
go-version : ${{ env.GO_VERSION }}
156
124
- name : Build golangci-lint
157
125
run : make build
0 commit comments