Skip to content

Commit 3ec6e76

Browse files
committed
Add coverage workflow
1 parent cfeaa1f commit 3ec6e76

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/coverage.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on: [pull_request]
2+
name: Coverage
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.19.x]
8+
os: [ubuntu-latest]
9+
10+
runs-on: ${{ matrix.os }}
11+
steps:
12+
- name: Install Go
13+
uses: actions/setup-go@v3
14+
with:
15+
go-version: ${{ matrix.go-version }}
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Test
21+
run: go test -race -coverprofile="coverage.txt" -covermode=atomic ./...
22+
23+
- name: upload coverage
24+
uses: codecov/codecov-action@v1
25+
with:
26+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)