Skip to content

Commit d1a73bf

Browse files
committed
Add coverage report
1 parent 1737192 commit d1a73bf

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,25 @@ jobs:
1515
with:
1616
go-version-file: 'go.mod'
1717
- run: go test ./... -race
18+
19+
coverage:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-go@v5
27+
with:
28+
go-version-file: 'go.mod'
29+
- name: Run tests with coverage
30+
run: |
31+
go test -coverprofile=coverage.out -covermode=atomic $(go list ./... | grep -v '/examples/')
32+
- name: Generate coverage report
33+
uses: fgrosse/[email protected]
34+
with:
35+
coverage-file: coverage.out
36+
coverage-threshold: 50
1837

1938
verify-codegen:
2039
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.idea
44
.opencode
55
.claude
6+
coverage.out

0 commit comments

Comments
 (0)