Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci/coverage: use json summary and upload html details
Browse files Browse the repository at this point in the history
sreimers committed Jun 7, 2024

Verified

This commit was signed with the committer’s verified signature.
sreimers Sebastian Reimers
1 parent 7db5599 commit 4685446
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -43,11 +43,19 @@ jobs:
- name: install gcovr
run: |
pip install gcovr==5.0
pip install gcovr
- name: coverage check
run: |
min_cov="64.6"
cov=$(~/.local/bin/gcovr -r . -s | grep lines | awk '{ print $2 }' | sed 's/%//')
mkdir html
cov=$(~/.local/bin/gcovr -r . --html-details html/index.html --json-summary | jq .line_percent)
echo "Coverage: ${cov}% (min $min_cov%)"
zip -r coverage.zip html
exit $(echo "$cov < $min_cov" | bc -l)
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.zip
retention-days: 7

0 comments on commit 4685446

Please sign in to comment.