Skip to content

Commit eae8078

Browse files
committed
chore: update Go versions and workflow steps for testing
- Updated Go versions in the test matrix to 1.20.x, 1.21.x, and 1.22.x. - Reorganized workflow steps for clarity and consistency. - Ensured the use of the latest actions for setup and caching.
1 parent da2693c commit eae8078

1 file changed

Lines changed: 28 additions & 13 deletions

File tree

.github/workflows/atomiccache-test.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,36 @@ on: [push, pull_request]
33
jobs:
44
test:
55
strategy:
6+
fail-fast: false
67
matrix:
7-
go-version: [1.16.x, 1.17.x]
8+
go-version: [1.20.x, 1.21.x, 1.22.x]
89
os: [ubuntu-latest, macos-latest, windows-latest]
910
runs-on: ${{ matrix.os }}
1011
steps:
11-
- name: Install Go
12-
uses: actions/setup-go@v2
13-
with:
14-
go-version: ${{ matrix.go-version }}
15-
- name: Checkout code
16-
uses: actions/checkout@v2
17-
- name: Install staticcheck
18-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
19-
- name: Test
20-
run: go test ./...
21-
- name: Staticcheck test
22-
run: staticcheck ./...
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
- name: Set up Go
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: ${{ matrix.go-version }}
18+
- name: Cache Go modules
19+
uses: actions/cache@v4
20+
with:
21+
path: |
22+
~/.cache/go-build
23+
~/go/pkg/mod
24+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
25+
restore-keys: |
26+
${{ runner.os }}-go-
27+
- name: Install staticcheck
28+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
29+
- name: Vet
30+
run: go vet ./...
31+
- name: Test
32+
run: go test ./...
33+
- name: Test (race detector)
34+
if: matrix.os == 'ubuntu-latest'
35+
run: go test -race ./...
36+
- name: Staticcheck test
37+
run: staticcheck ./...
2338

0 commit comments

Comments
 (0)