ci: skip heavy jobs when only docs/workflows/config change#203
Merged
Conversation
Adds path-based job filtering. Doc-only PRs (the bulk of recent work) no longer run the full Rust test suite (~5min), Node test suite (~1.5min), Rust clippy (~3min), or TS lint (~30s). They run only: - dprint format check (~30s) - version consistency check (skipped unless manifests change) - the detect-changes job itself (~5s) How it works: 1. New detect-changes job uses dorny/paths-filter to classify changed files into 6 buckets: frontend, rust, npm, cargo, docs, workflows, config 2. Each downstream job has 'needs: detect-changes' + 'if' condition based on which buckets changed 3. Doc-only PRs: only dprint runs (plus detect-changes itself) Job-by-job mapping: frontend → lint-ts, test-frontend rust → lint-rust, test-rust npm → npm-audit, deps-age cargo → cargo-audit, check-versions (when Cargo.toml/lock changed) docs → dprint workflows → (none — workflow changes always trigger detect-changes) config → (none — config files covered by their owning bucket) New dprint job: - Catches formatting issues that lefthook might miss (e.g., PRs opened via GitHub UI without local pre-commit) - Runs on any doc or frontend change test-e2e stays disabled (if: false) per existing config. Note: dorny/paths-filter SHA pinned to v3.0.2. SHA may need verification on first run; if workflow errors on detect-changes, update to current SHA from https://github.com/dorny/paths-filter/releases.
Correct SHA: d1c1ffe0248fe513906c8e24db8ea791d46f8590
EVWorth
force-pushed
the
ci/path-filters-sha-fix
branch
from
July 19, 2026 03:36
c4304ad to
464d4f4
Compare
EVWorth
force-pushed
the
ci/path-filters-sha-fix
branch
from
July 19, 2026 03:36
464d4f4 to
190094b
Compare
dprint check was running on ALL files in the repo, blocking PRs when any file (even unrelated, pre-existing) had formatting drift. Now restricted to files in the PR diff: - git diff origin/main...HEAD to get changed files - filter to format-checkable extensions (.md, .ts, .json, .yml, etc.) - pass list to npx dprint check A docs-only PR will only run dprint against the docs that changed. A config-only PR runs against the changed config files. Also added 'config' to the dprint trigger condition so config file changes (lefthook.yml, dprint.json, etc.) get format-checked.
Removes the cargo-audit job entirely from PR CI. The previous approach (#188, also carried in #203) was to pin 28 RUSTSEC-XXXX-XXXX advisories with --ignore flags, making the audit pass while leaving the underlying issues unfixed. That was hiding the problem, not solving it. The advisories are in transitive deps of the tauri/gtk-rs/sqlx ecosystem. Fixing them properly requires: - Bumping parent crates (tauri, sqlx, rustls) to versions that pull newer transitive deps - Replacing unmaintained gtk-rs GTK3 bindings (RUSTSEC-2024-0413) - Testing for API breaks Until that work lands, no cargo-audit check in PR CI. The issues are now visible (anyone can run 'cargo audit' locally) and tracked in a follow-up issue. Removed: - Entire cargo-audit job (~35 lines) - 28 --ignore RUSTSEC-* flags Kept: - npm-audit (separate ecosystem, no fixes needed) - detect-changes.cargo output (still triggers check-versions when Cargo.toml/lock changes) Refs: #188 (closed, superseded)
This was referenced Jul 19, 2026
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
Doc-only PRs no longer run the full Rust/Node test suites. They run only:
Saves ~5 minutes of CI time per docs PR.
How
detect-changesjob usesdorny/paths-filter(v3.0.2, SHAd1c1ffe0...) to classify changed files into 7 buckets: frontend, rust, npm, cargo, docs, workflows, config.needs: detect-changes+if:gating on the relevant bucket(s).dprintjob runs on any docs/frontend/config change, scoped to PR diff only (not whole repo).Cargo-audit removed
A previous attempt to fix CI used
cargo audit --ignore RUSTSEC-...for 28 advisories on transitive deps in the tauri/gtk-rs/sqlx ecosystem. That hid the issues without fixing them.This PR removes cargo-audit from PR CI entirely. The advisories are real and visible (anyone can run
cargo auditlocally). Tracking the fixes in a follow-up issue. Re-adding cargo-audit to PR CI only after the underlying issues are resolved.Job → Bucket mapping
npm-auditcheck-versionsdeps-agelint-tslint-rusttest-rusttest-frontenddprint(NEW)detect-changestest-e2eif: false(disabled)cargo-auditDiff
Validated
Verified on validation PR #202 (closed):
Related