Skip to content

ci: #795 — add weekly cargo llvm-cov coverage workflow#821

Merged
proggeramlug merged 1 commit into
mainfrom
worktree-fix-795-coverage-workflow
May 16, 2026
Merged

ci: #795 — add weekly cargo llvm-cov coverage workflow#821
proggeramlug merged 1 commit into
mainfrom
worktree-fix-795-coverage-workflow

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Summary

  • New .github/workflows/coverage.yml runs cargo llvm-cov Mondays at 04:00 UTC + workflow_dispatch.
  • Non-blocking by design — the goal is visibility (which perry-codegen / perry-transform / perry-runtime functions have 0% coverage), not a regression gate.
  • Same --exclude list as the existing cargo-test job (UI backends, perry-jsruntime) so it builds on ubuntu-latest.

Artifacts published per run

  • coverage-html — full HTML report (90-day retention).
  • coverage-lcovlcov.info for IDE / external tooling.
  • $GITHUB_STEP_SUMMARY--summary-only headline table so the topline numbers show up on the job page without downloading anything.

Robustness

  • continue-on-error: true on the coverage step + if: always() on uploads — a single crate's test failure doesn't suppress the rest of the report.
  • Separate Swatinem/rust-cache shared-key (-coverage) since the instrumented build can't share objects with the regular test cache.

Test plan

  • Workflow YAML parses (python3 -c "import yaml; yaml.safe_load(...)").
  • First run via workflow_dispatch after merge will validate the action behavior on the real runner.

Closes #795.

Adds `.github/workflows/coverage.yml`. Runs Mondays at 04:00 UTC and on
`workflow_dispatch`. Non-blocking: the goal is visibility into which
functions in `perry-codegen` / `perry-transform` / `perry-runtime` have
0% test coverage so we can target the gaps. Steps:

- Install `cargo-llvm-cov` via `taiki-e/install-action`.
- Run `cargo llvm-cov` with the same `--exclude` list as the existing
  `cargo-test` job (perry-ui-{macos,ios,visionos,tvos,watchos,gtk4,android,windows}
  + perry-jsruntime) so it builds on the Linux runner.
- Emit three views: an HTML report (uploaded as `coverage-html`
  artifact, 90-day retention), an `lcov.info` file (for IDE / external
  tooling, same retention), and a `summary-only` text dump that's
  written into `$GITHUB_STEP_SUMMARY` so the headline numbers show up
  on the job page without downloading the artifact.
- `continue-on-error: true` on the coverage step + `if: always()` on
  the upload steps so a per-crate test failure doesn't suppress the
  rest of the report.

Uses a distinct `Swatinem/rust-cache` key (`-coverage`) since the
instrumented build can't share objects with the regular test cache.
@proggeramlug proggeramlug merged commit 06005af into main May 16, 2026
9 checks passed
@proggeramlug proggeramlug deleted the worktree-fix-795-coverage-workflow branch May 16, 2026 03:10
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.

CI: add cargo llvm-cov weekly coverage report

1 participant