feat(ci): skip coverage on PRs; run on push-to-main only#15
Open
feat(ci): skip coverage on PRs; run on push-to-main only#15
Conversation
The coverage job duplicates the `test` job under llvm-cov instrumentation and adds ~20min to every PR across all 38 paiml repos. Running it only on push-to-main (and opt-in workflow_dispatch) halves PR wall-clock time without losing trend coverage — codecov still receives data from every merged commit. The existing gate job already treats `skipped` coverage as non-failing (it only fails on explicit failure), so no gate logic change is needed. Impact: PR wall time drops from ~21min to ~13min (test + lint still run). Consumer workflows that need coverage on PRs can trigger via workflow_dispatch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
coveragejob ongithub.event_name == 'push' || workflow_dispatchso it no longer runs onpull_requestWhy
Coverage runs
cargo llvm-cov test --lib— a duplicate of thetestjob under instrumentation. That's ~20min of redundant work on every PR. Trend coverage only needs to be measured once per merged commit, not once per PR iteration.Observed last run on paiml-mcp-agent-toolkit (PR #296, commit 31e17049):
ci / test: 21m 12sci / coverage: 21m 0s ← duplicateci / lint: 12m 37sci / gate: 6sGate compatibility
The existing
gatejob only fails on explicitfailure, notskipped:So coverage being
skippedon PRs passes the gate cleanly. No gate-logic change needed.Escape hatches
workflow_dispatchstill runs coverage — manual opt-in for PR authors who need a coverage delta before merginginputs.skip_coverage: truestill works as before for repos that never want coverageTest plan
coveragejob shows asSkippedgatestill succeedsmainon a consumer repo runs coverage end-to-end🤖 Generated with Claude Code