ci: only run nix build/fmt when nix files change#68
Merged
Conversation
Gate the CI workflow with a path filter so the nixfmt check and the (expensive) macOS darwin build only run when nix-relevant files change. PRs that touch only non-nix files (nvim lua, wezterm, README, etc.) no longer trigger wasteful build/fmt runs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WhHQrJp4TeYPZ2buJGSKHg
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.
What
Same change as #67, applied to the
for-businessbranch. Add apathsfilter to the CI workflow so it only triggers when nix-relevant files change:Why
CI currently runs on every PR. Both jobs — the
nixfmtcheck and the expensivemacos-26darwin build — run even when no nix config was touched (e.g. PRs that only change nvim lua, wezterm, README). That's wasted CI time and macOS runner minutes.With this filter, PRs that don't touch
.nixfiles orflake.lockskip the workflow entirely. The workflow file itself is included so changes to CI re-validate.Note
If
nixfmt/build darwinConfigurationare configured as required status checks in branch protection, skipped runs report no status and can block merging. If so, either drop them from required checks or convert to a "skip" sentinel job.🤖 Generated with Claude Code
Generated by Claude Code