coverage.yml
1name: coverage
2
3on:
4 push:
5 branches:
6 - "main"
7 pull_request:
8
9jobs:
10 coverage:
11 runs-on: ubuntu-latest
12 steps:
13 - uses: actions/checkout@v4
14
15 - name: Set up Go
16 uses: actions/setup-go@v5
17 with:
18 go-version: ^1
19
20 - name: Test
21 run: go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -timeout 5m
22 - uses: codecov/codecov-action@v3
23 with:
24 file: ./coverage.txt