@@ -11,14 +11,26 @@ jobs:
11
11
name : Test
12
12
runs-on : ubuntu-latest
13
13
steps :
14
+ - name : Check out code into the Go module directory
15
+ uses : actions/checkout@v4
16
+
14
17
- name : Set up Go
15
- uses : actions/setup-go@v3
18
+ uses : actions/setup-go@v5
16
19
with :
17
- go-version : ^1.22
18
- id : go
20
+ go-version : ^1.24
19
21
20
- - name : Check out code into the Go module directory
21
- uses : actions/checkout@v2
22
+ - name : Cache Go modules
23
+ uses : actions/cache@v4
24
+ with :
25
+ path : |
26
+ ~/.cache/go-build
27
+ ~/go/pkg/mod
28
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-go-
31
+
32
+ - name : Download dependencies
33
+ run : go mod download
22
34
23
35
- name : Run unit tests and generate the coverage report
24
36
run : make test-race
@@ -27,26 +39,38 @@ jobs:
27
39
name : Lint
28
40
runs-on : ubuntu-latest
29
41
steps :
42
+ - name : Check out code into the Go module directory
43
+ uses : actions/checkout@v4
44
+
30
45
- name : Set up Go
31
- uses : actions/setup-go@v3
46
+ uses : actions/setup-go@v5
32
47
with :
33
- go-version : ^1.22
34
- id : go
48
+ go-version : ^1.24
35
49
36
- - name : Check out code into the Go module directory
37
- uses : actions/checkout@v2
50
+ - name : Cache Go modules
51
+ uses : actions/cache@v4
52
+ with :
53
+ path : |
54
+ ~/.cache/go-build
55
+ ~/go/pkg/mod
56
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
57
+ restore-keys : |
58
+ ${{ runner.os }}-go-
59
+
60
+ - name : Download dependencies
61
+ run : go mod download
38
62
39
63
- name : Install gofumpt
40
64
run :
go install mvdan.cc/[email protected]
41
65
42
66
- name : Install staticcheck
43
- run : go install honnef.co/go/tools/cmd/staticcheck@2024 .1.1
67
+ run : go install honnef.co/go/tools/cmd/staticcheck@2025 .1.1
44
68
45
69
- name : Install golangci-lint
46
- run : go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
70
+ run : go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8
47
71
48
- - name : Install NilAway
49
- run :
go install go.uber.org/nilaway/cmd/[email protected]
72
+ # - name: Install NilAway
73
+ # run: go install go.uber.org/nilaway/cmd/[email protected]
50
74
51
75
- name : Lint
52
76
run : make lint
0 commit comments