19
19
# benchmarks. At the end do a quick check to ensure the tests to not leave
20
20
# files in the tree.
21
21
test :
22
- name : " test: go${{matrix.gover}}.x/ ${{matrix.os}}"
22
+ name : " test: ${{matrix.os}}"
23
23
runs-on : " ${{matrix.os}}"
24
24
continue-on-error : true
25
25
defaults :
29
29
fail-fast : false
30
30
matrix :
31
31
os : [ubuntu-latest, macos-latest, windows-latest]
32
- # Do not forget to bump every 6 months!
33
- gover : ["1.19"]
34
32
env :
35
33
PYTHONDONTWRITEBYTECODE : x
36
34
steps :
40
38
- uses : actions/checkout@v3
41
39
with :
42
40
fetch-depth : 2
43
- - uses : actions/setup-go@v3
41
+ - uses : actions/setup-go@v4
44
42
with :
45
- go-version : " ~${{matrix.gover}}.0"
46
- cache : true
43
+ go-version-file : go.mod
47
44
- name : ' go install necessary tools'
48
45
if : always()
49
46
run : |
53
50
run : go test -timeout=120s -covermode=count -coverprofile coverage.txt -bench=. -benchtime=1x ./...
54
51
# Don't send code coverage if anything failed to reduce spam.
55
52
- uses : codecov/codecov-action@v2
53
+ timeout-minutes : 1
56
54
- name : ' Cleanup'
57
55
if : always()
58
56
run : rm coverage.txt
87
85
# to cut on runtime, at the cost of latency. I dislike waiting for results
88
86
# so I prefer to run them in parallel.
89
87
lint :
90
- name : " lint: go${{matrix.gover}}.x/ ${{matrix.os}}"
88
+ name : " lint: ${{matrix.os}}"
91
89
runs-on : " ${{matrix.os}}"
92
90
continue-on-error : true
93
91
defaults :
@@ -100,19 +98,16 @@ jobs:
100
98
# OS-specific code benefits from explicitly linting on macOS and
101
99
# Windows.
102
100
os : [ubuntu-latest, macos-latest, windows-latest]
103
- # Do not forget to bump every 6 months!
104
- gover : ["1.19"]
105
101
env :
106
102
PYTHONDONTWRITEBYTECODE : x
107
103
steps :
108
104
- name : Turn off git core.autocrlf
109
105
if : matrix.os == 'windows-latest'
110
106
run : git config --global core.autocrlf false
111
107
- uses : actions/checkout@v3
112
- - uses : actions/setup-go@v3
108
+ - uses : actions/setup-go@v4
113
109
with :
114
- go-version : " ~${{matrix.gover}}.0"
115
- cache : true
110
+ go-version-file : go.mod
116
111
- name : " Debug"
117
112
run : |
118
113
echo HOME = $HOME
@@ -228,7 +223,7 @@ jobs:
228
223
- name : " Check: go mod tidy doesn't modify files"
229
224
if : always()
230
225
run : |
231
- go mod tidy -compat=1.17
226
+ go mod tidy
232
227
TOUCHED=$(git status --porcelain --ignored)
233
228
if ! test -z "$TOUCHED"; then
234
229
echo "go mod tidy was not clean, please update:"
@@ -288,23 +283,20 @@ jobs:
288
283
289
284
290
285
codeql :
291
- name : " codeql: go${{matrix.gover}}.x/ ${{matrix.os}}"
286
+ name : " codeql: ${{matrix.os}}"
292
287
runs-on : " ${{matrix.os}}"
293
288
continue-on-error : true
294
289
strategy :
295
290
fail-fast : false
296
291
matrix :
297
292
os : [ubuntu-latest]
298
- # Do not forget to bump every 6 months!
299
- gover : ["1.19"]
300
293
permissions :
301
294
security-events : write
302
295
steps :
303
296
- uses : actions/checkout@v3
304
- - uses : actions/setup-go@v3
297
+ - uses : actions/setup-go@v4
305
298
with :
306
- go-version : " ~${{matrix.gover}}.0"
307
- cache : true
299
+ go-version-file : go.mod
308
300
- name : Initialize CodeQL
309
301
uses : github/codeql-action/init@v2
310
302
with :
0 commit comments