Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f62ea83

Browse files
committedMar 11, 2025·
publish coverage in github pull requests
1 parent a49296b commit f62ea83

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
 

‎.github/workflows/tests.yml

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

34+
- name: Convert go coverage to corbetura format
35+
run: |
36+
go install github.com/boumenot/gocover-cobertura@latest
37+
gocover-cobertura -by-files < test/coverage.out > test/coverage.xml
38+
39+
- name: Generate code coverage report
40+
uses: irongut/CodeCoverageSummary@v1.3.0
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+
with:
55+
recreate: true
56+
path: code-coverage-results.md
57+
3458
test:
3559
name: Docker tests
3660
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)
Please sign in to comment.