From 5974671dab14a970b23e068ad1a1fbf3fbf8027f Mon Sep 17 00:00:00 2001 From: Gonzalo Martinez Lema Date: Sun, 3 Nov 2024 19:04:12 +0100 Subject: [PATCH] Raise a warning if coverage incomplete --- .github/workflows/coverage.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 70e343c22..0653b9966 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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