Skip to content

Commit

Permalink
fix ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
christomitov committed Feb 19, 2025
1 parent 50da960 commit 0990d50
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,19 @@ jobs:

- name: Verify minimum coverage
run: |
COVERAGE=$(cat cover/excoveralls.json | jq '.total_coverage')
if [ ! -f "cover/excoveralls.json" ]; then
echo "Coverage file not found!"
exit 1
fi
COVERAGE=$(jq -r '.total' cover/excoveralls.json)
if [ "$COVERAGE" = "null" ] || [ -z "$COVERAGE" ]; then
echo "Could not parse coverage value!"
echo "Coverage file contents:"
cat cover/excoveralls.json
exit 1
fi
MINIMUM=5.0
if (( $(echo "$COVERAGE < $MINIMUM" | bc -l) )); then
echo "Test coverage is below minimum: $COVERAGE% < $MINIMUM%"
Expand Down

0 comments on commit 0990d50

Please sign in to comment.