Skip to content

Commit 5b9c2ce

Browse files
authored
Update Github test actions (#85)
1 parent 1eab316 commit 5b9c2ce

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

.github/workflows/tests.yml

+13-27
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,37 @@ jobs:
2020
matrix:
2121
go-version: [1.18.x, 1.x]
2222
steps:
23-
- uses: actions/checkout@v3
24-
with:
25-
fetch-depth: 1
26-
- uses: WillAbides/setup-go-faster@v1
27-
with:
28-
go-version: ${{ matrix.go-version }}
23+
- uses: actions/checkout@v4
2924

30-
- uses: actions/cache@v3
25+
- name: Setup Go ${{ matrix.go-version }}
26+
uses: actions/setup-go@v5
3127
with:
32-
# In order:
33-
# * Module download cache
34-
# * Build cache (Linux)
35-
# * Build cache (Mac)
36-
# * Build cache (Windows)
37-
path: |
38-
~/go/pkg/mod
39-
~/.cache/go-build
40-
~/Library/Caches/go-build
41-
%LocalAppData%\go-build
42-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
43-
restore-keys: |
44-
${{ runner.os }}-go-
28+
go-version: ${{ matrix.go-version }}
4529

4630
- name: Test with race and coverage
4731
run: |
4832
go test -race -coverprofile=coverage.out -covermode=atomic
4933
go tool cover -func=coverage.out
5034
51-
- uses: codecov/codecov-action@v3
35+
- uses: codecov/codecov-action@v4
5236
with:
5337
files: ./coverage.out
38+
token: ${{ secrets.CODECOV_TOKEN }} # required
5439

5540
lint:
5641
name: "Run static analysis"
5742
runs-on: "ubuntu-latest"
5843
steps:
59-
- uses: actions/checkout@v3
60-
with:
61-
fetch-depth: 1
62-
- uses: WillAbides/setup-go-faster@v1
44+
- uses: actions/checkout@v4
45+
46+
- name: Setup Go ${{ matrix.go-version }}
47+
uses: actions/setup-go@v5
6348
with:
6449
go-version: "1.x"
6550

6651
- run: "go vet ./..."
6752

68-
- uses: dominikh/staticcheck-action@v1
53+
- name: Staticcheck
54+
uses: dominikh/[email protected]
6955
with:
70-
version: "2022.1.3"
56+
install-go: false

0 commit comments

Comments
 (0)