Skip to content

Commit 103fa9f

Browse files
committed
publish coverage in github pull requests
1 parent a49296b commit 103fa9f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/tests.yml

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

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

0 commit comments

Comments
 (0)