From e11cfd921841bc7326e87804bfdaa2bf059cb59a Mon Sep 17 00:00:00 2001 From: Blai Peidro Date: Sun, 22 Nov 2026 18:50:09 +0100 Subject: [PATCH] ci: name the uncovered lines when the coverage gate fails --- .github/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0ab0e76..d200b77 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -68,14 +68,18 @@ jobs: # # pipefail: without it the step's status is tee's, and a coverage # failure would pass the check. + # + # --show-missing-lines: a failing run names the file and line numbers + # no test reached, after the table; the summary picks the table's + # TOTAL row by name, since that list would follow it. - name: tests + coverage (every line) run: | set -o pipefail - cargo llvm-cov --workspace --fail-under-lines 100 --summary-only | tee coverage.txt + cargo llvm-cov --workspace --fail-under-lines 100 --summary-only --show-missing-lines | tee coverage.txt { echo '### Coverage' echo '```' - tail -n 3 coverage.txt + grep -B2 '^TOTAL' coverage.txt echo '```' } >> "$GITHUB_STEP_SUMMARY"