ci: #795 — add weekly cargo llvm-cov coverage workflow#821
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/coverage.ymlrunscargo llvm-covMondays at 04:00 UTC +workflow_dispatch.perry-codegen/perry-transform/perry-runtimefunctions have 0% coverage), not a regression gate.--excludelist as the existingcargo-testjob (UI backends, perry-jsruntime) so it builds onubuntu-latest.Artifacts published per run
coverage-html— full HTML report (90-day retention).coverage-lcov—lcov.infofor IDE / external tooling.$GITHUB_STEP_SUMMARY—--summary-onlyheadline table so the topline numbers show up on the job page without downloading anything.Robustness
continue-on-error: trueon the coverage step +if: always()on uploads — a single crate's test failure doesn't suppress the rest of the report.Swatinem/rust-cacheshared-key (-coverage) since the instrumented build can't share objects with the regular test cache.Test plan
python3 -c "import yaml; yaml.safe_load(...)").workflow_dispatchafter merge will validate the action behavior on the real runner.Closes #795.