Skip to content

Commit 0bbc76e

Browse files
committed
ci: modernize
1 parent c2276d4 commit 0bbc76e

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,30 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Check out code
16-
uses: actions/checkout@master
16+
uses: actions/checkout@v4
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
1719
- name: Lint Go Code
18-
uses: docker://golangci/golangci-lint:latest
19-
with:
20-
args: golangci-lint run ./...
20+
uses: golangci/golangci-lint-action@v6
2121

2222
test:
2323
name: Test
2424
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
go-version: ['stable', 'oldstable']
2529
steps:
2630
- name: Checkout
27-
uses: actions/checkout@master
31+
uses: actions/checkout@v4
2832
- name: Set up Go
29-
uses: actions/setup-go@v2
33+
uses: actions/setup-go@v5
3034
with:
31-
go-version: '1.19'
32-
- name: Install project dependencies
33-
run: go get
35+
go-version: ${{ matrix.go-version }}
3436
- name: Test
35-
run: go test -race -covermode atomic -coverprofile=profile.cov ./...
37+
run: go test -race ${{ matrix.go-version == 'stable' && '-covermode atomic -coverprofile=profile.cov' || ''}}
3638
- name: Upload coverage results
37-
env:
38-
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: |
40-
GO111MODULE=off go get github.com/mattn/goveralls
41-
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
39+
if: matrix.go-version == 'stable'
40+
uses: shogo82148/actions-goveralls@v1
41+
with:
42+
path-to-profile: profile.cov

0 commit comments

Comments
 (0)