ci: reduce PR check time from ~30 min to ~1 min#1073
Merged
cjpais merged 2 commits intocjpais:mainfrom Mar 18, 2026
Merged
Conversation
c75e937 to
307f783
Compare
3181068 to
0519a60
Compare
VirenMohindra
commented
Mar 17, 2026
.github/workflows/nix-check.yml
Outdated
Comment on lines
+14
to
+20
| paths: | ||
| - "flake.nix" | ||
| - "flake.lock" | ||
| - ".nix/**" | ||
| - "bun.lock" | ||
| - "src-tauri/Cargo.toml" | ||
| - "src-tauri/Cargo.lock" |
Contributor
Author
There was a problem hiding this comment.
quick note on path filters..
src/** and src-tauri/** only trigger the fast checks (bun.nix sync + flake eval). the expensive nix build step is gated behind a separate diff check that looks for nix packaging files (flake.nix, flake.lock, .nix/**, bun.lock, Cargo.toml, Cargo.lock). so a TS or rust only change won't kick off a 25 min build
43b95bf to
ec56880
Compare
- merge lint + prettier into single code-quality workflow - add concurrency groups to cancel stale runs on rapid pushes - add path filters so irrelevant changes skip checks - make full nix build opt-in via "nix" label (eval-only by default) - add nix store caching via magic-nix-cache-action - cache trusted-signing-cli binary on windows builds - upgrade setup-bun from v1 to v2
ec56880 to
9c87ca6
Compare
xilec
reviewed
Mar 17, 2026
Contributor
xilec
left a comment
There was a problem hiding this comment.
Nice improvements overall!
xilec
reviewed
Mar 17, 2026
- add .github/workflows/** to path filters on code-quality and nix-check so CI runs when workflow files themselves change - include tauri.conf.json and build.rs in nix full-build diff check since these can break nix sandbox builds independently of cargo builds
Owner
|
@VirenMohindra @xilec is this good to go?! |
Contributor
Author
|
yessir @cjpais |
Contributor
|
LGTM |
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.
Before Submitting This PR
Human Written Description
every push to a PR triggers 5 workflows with no concurrency controls, no path filters, and no nix caching. a
READMEchange triggers rust tests + a 30 min nix build. rapid pushes trigger duplicate runs that pile upthis PR adds concurrency groups, path filters, merges redundant workflows, and adds nix store caching. for PRs that don't touch nix files (the majority), the critical path drops from ~30 min to ~23 sec
Related Issues/Discussions
general CI/CD performance, no specific issue filed
Testing
tested on this PR itself:
frontend-only change (src/):
nix change (flake.nix):
concurrency groups confirmed, stale nix run was cancelled when new push arrived
changes
code-quality.yml: eliminates one runner startup + duplicatebun installcancel-in-progress: truecancels stale runssrc/triggers code-quality + playwright + nix quick checks,src-tauri/triggers rust test + nix quick checks, nix packaging files trigger the full nix buildflake.nix,flake.lock,.nix/**,bun.lock,Cargo.toml,Cargo.lock)DeterminateSystems/magic-nix-cache-action@v13[email protected]on windows: avoids recompiling from source every release buildsetup-bunv1 → v2 in all workflowsworkflow_dispatchon all workflows: manual trigger escape hatch when path filters need bypassingnote on branch protection
this PR deletes
lint.ymlandprettier.yml, replacing them withcode-quality.yml. if branch protection rules require the old check names ("lint", "prettier"), they'll need to be updated to require "code-quality" insteadfollow-up recommendation
the nix build is still ~25 min with a cold cache. setting up a cachix binary cache (free for open source, requires a repo secret) would bring this down to ~5 min by caching compiled outputs. happy to set this up if you create a cachix account
AI Assistance
If AI was used: