Skip to content

Commit

Permalink
Raise a warning if coverage incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaponte committed Nov 19, 2024
1 parent 457f4e4 commit 5974671
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ jobs:
run: |
echo "Showing only files with coverage < 100%"
head -2 coverage_report
FAIL=0
incomplete_coverage=$(head -n -2 coverage_report | tail -n +3 | grep -v "100%")
while read line; do
FAIL=1
printf '\033[0;31m%s\033[0m\n' "$line" # red color ... reset color
done <<<${incomplete_coverage}
tail -2 coverage_report
exit $FAIL
if [ ! -z "$incomplete_coverage"]; then
echo "::warning ::Test suite coverage incomplete"
fi

0 comments on commit 5974671

Please sign in to comment.