Skip to content

Commit 321f834

Browse files
committed
ci: add multi-version Go testing and optimize coverage upload
1 parent d41d9b6 commit 321f834

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,22 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
goVersion: [ "1.11", "1.21", "1.23" ]
1215
steps:
1316
- uses: actions/checkout@v4
1417

1518
- name: Set up Go
1619
uses: actions/setup-go@v4
1720
with:
18-
go-version: '1.21'
21+
go-version: ${{ matrix.goVersion }}
1922

2023
- name: Run tests with coverage
2124
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
2225

2326
- name: Upload coverage reports to Codecov
27+
if: ${{ matrix.goVersion == '1.23' }}
2428
uses: codecov/codecov-action@v5
2529
with:
2630
token: ${{ secrets.CODECOV_TOKEN }}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/yarlson/pin
22

3-
go 1.21
3+
go 1.11

0 commit comments

Comments
 (0)