nix/coverage-html: use line coverage for badge number
Build and test / test (push) Failing after 56s
Build and test / build (push) Successful in 1m2s
Build and test / build-freebsd-cross (push) Successful in 2m5s

This commit is contained in:
2026-06-11 17:55:13 +09:00
parent 28ddaff0b7
commit 5ed46a1de8
+1 -1
View File
@@ -62,7 +62,7 @@ stdenv.mkDerivation {
TOTAL_COVERAGE="$(
htmlq 'td > pre' <coverage-html/index.html \
| sed '0,/^<pre>Totals<\/pre>$/d' \
| head -n 1 \
| head -n 2 \ # Skip "Totals" and "Function Coverage", get "Line Coverage"
| sed -e 's/<pre>[[:space:]]*//' -e 's/%.*$/%/' \
)"