Skip to content

Commit 0377e34

Browse files
committed
publish coverage in github pull requests
1 parent a49296b commit 0377e34

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: .github/workflows/tests.yml

+25
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,31 @@ jobs:
3131
- name: Run checks
3232
run: make get-deps check
3333

34+
- name: Convert go coverage to corbetura format
35+
run: |
36+
go get github.com/boumenot/gocover-cobertura
37+
gocover-cobertura < test/coverage.out > test/coverage.xml
38+
39+
- name: Generate code coverage report
40+
uses: irongut/[email protected]
41+
with:
42+
filename: test/coverage.xml
43+
badge: false
44+
fail_below_min: false
45+
format: markdown
46+
hide_branch_rate: false
47+
hide_complexity: true
48+
indicators: true
49+
output: both
50+
thresholds: '60 80'
51+
52+
- name: Add Coverage PR Comment
53+
uses: marocchino/sticky-pull-request-comment@v2
54+
if: github.event_name == 'pull_request'
55+
with:
56+
recreate: true
57+
path: code-coverage-results.md
58+
3459
test:
3560
name: Docker tests
3661
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)