Skip to content

ci: only run nix build/fmt when nix files change#68

Merged
rin2yh merged 1 commit into
for-businessfrom
claude/nix-build-fmt-waste-for-business
Jun 29, 2026
Merged

ci: only run nix build/fmt when nix files change#68
rin2yh merged 1 commit into
for-businessfrom
claude/nix-build-fmt-waste-for-business

Conversation

@rin2yh

@rin2yh rin2yh commented Jun 29, 2026

Copy link
Copy Markdown
Owner

What

Same change as #67, applied to the for-business branch. Add a paths filter to the CI workflow so it only triggers when nix-relevant files change:

on:
  pull_request:
    branches: [for-business]
    paths:
      - "**/*.nix"
      - "flake.lock"
      - ".github/workflows/ci.yml"

Why

CI currently runs on every PR. Both jobs — the nixfmt check and the expensive macos-26 darwin 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 .nix files or flake.lock skip the workflow entirely. The workflow file itself is included so changes to CI re-validate.

Note

If nixfmt / build darwinConfiguration are 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

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
@rin2yh rin2yh marked this pull request as ready for review June 29, 2026 07:34
@rin2yh rin2yh merged commit e8b86fa into for-business Jun 29, 2026
2 checks passed
@rin2yh rin2yh deleted the claude/nix-build-fmt-waste-for-business branch June 29, 2026 07:34
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.

2 participants