ci: skip cargo suite when the change cannot affect Rust #32
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_bc2f5c51"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Stop running the full
cargo test+ clippy job when the change cannot affect the Rust build.Mechanism:
pathsallowlist on bothpush(main) andpull_request.GET /api/v1/repos/sirius/onionwire/branch_protectionsreturned[]— no required status checks — so a docs-only PR that produces notestcheck is not a merge trap. Did not add an in-workflow changed-files gate (would only matter if Lance later requires thetestcheck).Allowlist (what
cargo test/clippyat repo root actually read; norust-toolchain.toml,.cargo/config.toml, orbuild.rsin tree; tests do notinclude_strscripts/):src/**,crates/**,tests/**,Cargo.toml,Cargo.lock,.forgejo/workflows/ci.ymlNot in the allowlist:
docs/**,*.md,android/**,scripts/**,.forgejo/workflows/release.yml,.forgejo/workflows/android-release.yml,LICENSE.workflow_dispatch: kept, no path filter — always runs the full suite.Main-push duplication: kept on purpose (same allowlist). Trunk verification after merge; not dropped.
Suite when it runs: unchanged
cargo test --lockedandcargo clippy --locked --all-targets -- -D warnings. Concurrency grouponionwire-ci-piwithcancel-in-progress: falseunchanged.Measured savings (last 20
ci.ymlruns)13 of 20 would not have started under this filter (45.3 min serialized Pi wall-clock; mean skipped run ~209s). 7 of 20 still would run (they touched
src/ortests/).Concrete skips:
.forgejo/workflows/release.yml) — run 103 235s success, run 105 172s failure. The merge commit3e28fa3also bought a release build (run 107); that workflow is a different card.4a248f5(PR #26:android/**,scripts/build-android-local.sh,android-release.yml) — run 101 188s.Would still run (not a skip): docs merge PR #23 /
53f9914also touchedtests/tui_frames.rs.Local proof
git diff --statvs main:.forgejo/workflows/ci.yml,README.md(CI bullet only)cargo test --locked: 181 passed, 3 ignoredcargo clippy --locked --all-targets -- -D warnings: cleanad8b43c36c1218869629Live proof after merge:
docs/TUI.mdwhitespace): noci.ymlrun (commit statuses empty).src/probe PR #36: run 126 success.workflow_dispatchon main: run 124 success.GET .../branch_protections→[].