Skip to content

Commit 7361d58

Browse files
committed
Upload code coverage to Codedov
1 parent 81779e2 commit 7361d58

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

.github/workflows/go.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,31 @@ jobs:
1414
matrix:
1515
go-version: [ '1.18', '1.19', '1.20' ]
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v3
1818

19-
- name: Set up Go
20-
uses: actions/setup-go@v3
21-
with:
22-
go-version: ${{ matrix.go-version }}
19+
- name: Set up Go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ matrix.go-version }}
2323

24-
- name: Build
25-
run: go build -v ./...
24+
- name: Build
25+
run: go build -v ./...
2626

27-
- name: Test
28-
run: go test -v ./...
27+
- name: Test
28+
run: go test -race -v ./...
29+
30+
coverage:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v3
37+
with:
38+
go-version: '1.20'
39+
40+
- name: Generate coverage report
41+
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
42+
43+
- name: Upload coverage reports to Codecov
44+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)