Test Coverage
ferrocat now exposes workspace-local Cargo aliases for coverage reporting through cargo-llvm-cov.
The long-term goal for the shipped library surface is:
95%+line coverage forferrocat-po95%+line coverage forferrocat-icu95%+line coverage forferrocatonce the umbrella crate contains measurable executable logic beyond re-exports
The coverage commands intentionally exclude:
ferrocat-bench, which is a benchmark harness rather than shipped library codeferrocat-conformance, which is fixture data and expectations for the upstream snapshot
That keeps the report focused on the public and internal library crates that matter most in day-to-day changes:
ferrocatferrocat-poferrocat-icu
Baseline
Measured locally on 2026-03-18 with cargo coverage-summary plus a JSON summary export:
ferrocat-po:88.10%line coverageferrocat-icu:93.98%line coverageferrocat:N/Ainllvm-covtoday because the umbrella crate is almost entirely re-exports and does not currently surface measurable executable lines in the report
That means the current rollout is intentionally staged:
- Phase 1: standardized local commands and CI artifact publication
- Phase 2: crate-level guardrails close to the measured baseline
ferrocat-po >= 88%ferrocat-icu >= 93%ferrocatis still reported, but not percentage-gated untilllvm-covhas measurable lines for the crate
- Phase 3: raise the measurable core crates to
95%+
The next high-yield test targets after the current baseline are still:
ferrocat-po/src/api/catalog.rsferrocat-po/src/api/compile.rsferrocat-po/src/api/plural.rsferrocat-po/src/merge.rsferrocat-po/src/borrowed.rsferrocat-icu/src/parser.rs
Local Setup
Install the required tooling once:
rustup component add llvm-tools-preview
cargo install cargo-llvm-covLocal Commands
Print a terminal summary:
cargo coverage-summaryBuild an HTML report:
cargo coverageThe HTML output is written to:
target/coverage/html/index.htmlGenerate an LCOV file for external tooling:
cargo coverage-lcovThe LCOV output is written to:
target/lcov.infoCI
The GitHub Actions CI workflow runs a dedicated coverage job on Ubuntu, installs the required LLVM tooling, uploads the generated LCOV report to Codecov, and stores the same lcov.info file as a workflow artifact.
That same job now also exports target/coverage-summary.json and runs a small crate-aware gate script so the staged thresholds are enforced per crate instead of through one global blended percentage.
For private repositories, add a GitHub Actions repository secret named CODECOV_TOKEN.
For public repositories, tokenless upload may also work with codecov/codecov-action@v5 if token authentication has been disabled in the Codecov organization settings. If you want the least surprising setup, keep the CODECOV_TOKEN secret configured either way.