Skip to content

ci: switch coverage to cargo-llvm-cov#468

Merged
wboayue merged 3 commits intomainfrom
coverage-llvm-cov
Apr 26, 2026
Merged

ci: switch coverage to cargo-llvm-cov#468
wboayue merged 3 commits intomainfrom
coverage-llvm-cov

Conversation

@wboayue
Copy link
Copy Markdown
Owner

@wboayue wboayue commented Apr 26, 2026

Summary

  • Replace cargo-tarpaulin with cargo-llvm-cov in .github/workflows/coverage.yml and the just cover target. Single --all-features run covers both sync and async; drops the prior split runs and lcov merge.
  • Coverage workflow now triggers on push to main directly (no workflow_run-after-CI gate). Drop tarpaulin-era env vars (CARGO_INCREMENTAL=0, RUSTFLAGS=-C instrument-coverage) — cargo-llvm-cov manages instrumentation flags itself.
  • Update CONTRIBUTING.md, AGENTS.md, and .gitignore to match.

Test plan

  • CI run on this branch succeeds and uploads coverage/lcov.info to Coveralls
  • just cover locally produces an HTML report under target/llvm-cov/html/ and opens it
  • Coverage workflow triggers on the eventual merge to main

Notes

  • Toolchain still resolves via rust-toolchain.toml (1.95.0). dtolnay/rust-toolchain@stable in the action is overridden by the toolchain file at cargo invocation. Happy to swap to an explicit @1.95.0 to mirror ci.yml if preferred.
  • A leftover tarpaulin-report.html may exist at the repo root after this change (no longer ignored). Delete locally if undesired.

wboayue added 3 commits April 26, 2026 14:26
Replace cargo-tarpaulin with cargo-llvm-cov for both CI and the
just cover target. Single --all-features run covers sync + async
in one pass; drops the prior split sync/async runs and lcov merge.

Coverage workflow now triggers on push to main directly (no
workflow_run-after-CI gate). Drop CARGO_INCREMENTAL=0 and
RUSTFLAGS=-C instrument-coverage env — cargo-llvm-cov manages
instrumentation flags itself.
Update CONTRIBUTING.md install instructions and coverage command,
AGENTS.md description of the just cover target and artifact path,
and drop the stale tarpaulin-report.html .gitignore entry (target/
already covers the new llvm-cov output).
--all-features compiles only one branch of code gated by
cfg(all(feature = "sync", not(feature = "async"))) — 12 such gates
exist in src/. Run sync and async passes separately with --no-report,
then merge via 'cargo llvm-cov report --lcov' so both branches are
measured.

Also: pin dtolnay/rust-toolchain@1.95.0 (matches ci.yml and
rust-toolchain.toml so llvm-tools-preview installs against the
right toolchain), drop redundant if: condition (on: already filters
push-to-main), drop mkdir (cargo-llvm-cov creates the parent dir),
restore allow-empty: true on the Coveralls upload, switch
taiki-e/install-action to versioned @v2 form.
@wboayue wboayue merged commit 572c124 into main Apr 26, 2026
3 checks passed
@wboayue wboayue deleted the coverage-llvm-cov branch April 26, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant