Skip to content

Commit

Permalink
ci/coverage: use json summary and upload html details (#1139)
Browse files Browse the repository at this point in the history
* ci/coverage: use json summary and upload html details

* downgrade gcovr version

* separate coverage zip step
  • Loading branch information
sreimers authored Jun 7, 2024
1 parent 7db5599 commit b465775
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ jobs:
- 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%)"
exit $(echo "$cov < $min_cov" | bc -l)
- name: coverage zip
run: |
zip -r coverage.zip html
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.zip
retention-days: 7

0 comments on commit b465775

Please sign in to comment.