Skip to content

Commit

Permalink
Show change in percentage coverage in notification message (#341)
Browse files Browse the repository at this point in the history
* Show change in percentage coverage.

* Increase tolerance to match previously used threshold.
  • Loading branch information
cqc-alec committed Aug 3, 2023
1 parent eeba047 commit b714fa0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ jobs:
- name: Compare with previous summary and make message
id: make_msg
run: |
if (( $(echo "`cat coverage-summary-prev.txt` < `cat coverage-summary.txt` + 0.03" | bc -l) ))
change="`cat coverage-summary-prev.txt`% --> `cat coverage-summary.txt`%"
if (( $(echo "`cat coverage-summary-prev.txt` < `cat coverage-summary.txt` + 0.04" | bc -l) ))
then
echo "msg=Coverage check for hugr shows no regression. ✅ ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_OUTPUT"
echo "msg=Coverage check for hugr shows no regression (${change}). ✅ ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_OUTPUT"
else
echo "msg=Coverage check for hugr shows regression. ❌ ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_OUTPUT"
echo "msg=Coverage check for hugr shows regression (${change}). ❌ ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_OUTPUT"
fi
notify-slack:
needs: check-coverage
Expand Down

0 comments on commit b714fa0

Please sign in to comment.