Skip to content

ci: skip heavy jobs when only docs/workflows/config change#203

Merged
EVWorth merged 6 commits into
mainfrom
ci/path-filters-sha-fix
Jul 19, 2026
Merged

ci: skip heavy jobs when only docs/workflows/config change#203
EVWorth merged 6 commits into
mainfrom
ci/path-filters-sha-fix

Conversation

@EVWorth

@EVWorth EVWorth commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Doc-only PRs no longer run the full Rust/Node test suites. They run only:

  • detect-changes (~5s)
  • dprint format check (~30s)

Saves ~5 minutes of CI time per docs PR.

How

  1. New detect-changes job uses dorny/paths-filter (v3.0.2, SHA d1c1ffe0...) to classify changed files into 7 buckets: frontend, rust, npm, cargo, docs, workflows, config.
  2. Each existing job has needs: detect-changes + if: gating on the relevant bucket(s).
  3. New dprint job 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 audit locally). 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

Job Trigger Doc-only runs?
npm-audit npm
check-versions cargo, npm
deps-age npm
lint-ts frontend
lint-rust rust
test-rust rust
test-frontend frontend
dprint (NEW) docs, frontend, config
detect-changes (always)
test-e2e if: false (disabled)
cargo-audit REMOVED n/a

Diff

.github/workflows/ci.yml | 55 +++++++-----------------------------------------
1 file changed, 8 insertions(+), 47 deletions(-)

Validated

Verified on validation PR #202 (closed):

  • detect-changes: pass in 6s
  • dprint: ran correctly (scoped to changed files)
  • All Rust/Node test jobs: SKIPPED
  • Total CI time for docs-only PR: ~30s vs ~10min previously

Related

EVWorth added 3 commits July 18, 2026 22:35
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
EVWorth force-pushed the ci/path-filters-sha-fix branch from c4304ad to 464d4f4 Compare July 19, 2026 03:36
@EVWorth
EVWorth force-pushed the ci/path-filters-sha-fix branch from 464d4f4 to 190094b Compare July 19, 2026 03:36
EVWorth added 2 commits July 18, 2026 22:38
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)
@EVWorth
EVWorth merged commit 708608b into main Jul 19, 2026
10 checks passed
@EVWorth
EVWorth deleted the ci/path-filters-sha-fix branch July 19, 2026 14:04
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.

1 participant