Skip to content

Commit faabf14

Browse files
committed
ci: add coverage.yml
1 parent e9bf141 commit faabf14

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test Coverage
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
coverage:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v5
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v6
17+
with:
18+
go-version: '1.25'
19+
check-latest: true
20+
21+
- name: Install Go modules
22+
run: go mod download
23+
24+
- name: Verify dependencies
25+
run: go mod verify
26+
27+
- name: Run go test
28+
run: go test -count=1 -timeout 30s $(go list ./... | grep -Ev 'internal/testhelpers') -covermode=atomic -coverprofile=coverage.txt
29+
30+
- name: Upload coverage reports to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)