Retain only the coverage badge

This commit is contained in:
Dandaedre 2026-10-02 23:28:11 +02:00
parent ee85e981aa
commit 4f2a4d7b81
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
3 changed files with 14 additions and 15 deletions

5
Jenkinsfile vendored
View File

@ -188,8 +188,6 @@ pipeline {
--config tarpaulin.toml \
--output-dir coverage
mkdir -p coverage/html
mv coverage/tarpaulin-report.html coverage/html/index.html
mv coverage/tarpaulin-report.json coverage/summary.json
coverage_percent=$(awk -F'"coverage":' '
@ -202,11 +200,12 @@ pipeline {
scripts/render-coverage-badge.sh \
"${coverage_percent}" \
coverage/coverage.svg
rm coverage/summary.json
'''
archiveArtifacts(
allowEmptyArchive: false,
artifacts: 'coverage/**/*',
artifacts: 'coverage/coverage.svg',
fingerprint: true
)
}

View File

@ -44,12 +44,12 @@ cargo install cargo-tarpaulin --locked --version 0.37.5
cargo tarpaulin --config tarpaulin.toml
```
CI archives the HTML report, LCOV data, JSON summary, and SVG badge. The first
behavior-test pass reached 84.38% (81/96 lines); end-to-end byte-stream and
protocol lifecycle tests raised current coverage above 90%. The latest local
badge run measured 91.49%, allowing CI to enforce a 90% floor. Raise that floor
only after coverage remains stable under useful tests; never add brittle tests
or production branches merely to improve the number.
CI uses a temporary JSON summary to render and archive only the SVG badge. The
first behavior-test pass reached 84.38% (81/96 lines); end-to-end byte-stream
and protocol lifecycle tests raised current coverage above 90%. The latest
local badge run measured 91.49%, allowing CI to enforce a 90% floor. Raise that
floor only after coverage remains stable under useful tests; never add brittle
tests or production branches merely to improve the number.
After a successful test and coverage run, refresh the tracked README badges in
the same format used by `john-slop`:
@ -59,9 +59,9 @@ rust_autobadges --high-coverage-percent 0.7 --mid-coverage-percent 0.3
```
Commit `badges/version.svg`, `badges/test.svg`, `badges/coverage.svg`, and
`.run_status.toml`. The standalone HTML, JSON, and LCOV files produced in the
repository root are local generated output and remain ignored; Jenkins creates
its publishable copies below `coverage/`.
`.run_status.toml`. Standalone HTML, JSON, and LCOV files produced locally
remain ignored. Jenkins does not retain precise reports; it keeps only
`coverage/coverage.svg`.
For the public badge, the Jenkins worker exposes the shared `assets/` directory
at `/mnt/assets`, beside the existing `/mnt/books` mount. The pipeline sets
@ -74,8 +74,8 @@ MadGobblins/vsg-bridge-ls/main/coverage.svg
```
`main` is a real world-traversable directory, not a symlink. This avoids web
server symlink restrictions and keeps precise HTML, JSON, and LCOV reports in
Jenkins artifacts instead of the public assets mount. The README uses:
server symlink restrictions. Precise HTML, JSON, and LCOV reports are not
retained. The README uses:
```text
https://assets.dandaedre.com/coverage/MadGobblins/vsg-bridge-ls/main/coverage.svg

View File

@ -6,4 +6,4 @@ locked = true
run-types = ["Tests"]
[report]
out = ["Stdout", "Html", "Json", "Lcov"]
out = ["Stdout", "Json"]