ci: add flake build + nixfmt checks on PRs#62
Merged
Conversation
Adds a GitHub Actions workflow that runs on pull requests to main (and via manual dispatch): - lint: verify all .nix files match nixfmt-rfc-style formatting - build: build the aarch64-darwin darwinConfiguration on a macOS runner to catch flake evaluation/build breakage (e.g. from dependabot dependency bumps) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017zhEKbHFbFbZ8TQfEgkSdF
rin2yh
commented
Jun 27, 2026
- Pin actions to commit SHAs at their latest releases: actions/checkout v7.0.0, DeterminateSystems/nix-installer-action v22 - Build on macos-26 (latest GA macOS runner, arm64) to stay close to the local machine - Remove workflow_dispatch trigger (PR-only) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017zhEKbHFbFbZ8TQfEgkSdF
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.
概要
PR時に走るCIワークフロー (
.github/workflows/ci.yml) を追加します。主目的は、dependabotなどによる依存更新で flake の評価・ビルドが壊れていないかを自動検知することです。これまでこのリポジトリにはCIがなく、依存更新のマージ可否を手動で判断するしかありませんでした。
内容
トリガー:
main宛の pull request、およびworkflow_dispatch(手動実行)。lint.nixファイルがnixfmt-rfc-styleの整形に従っているか--checkで検証buildaarch64-darwinのdarwinConfigurations.default.systemを実際にビルドし、flakeの評価エラーやパッケージ更新による破壊を検出DeterminateSystems/nix-installer-action(リポジトリのMakefileがDeterminateインストーラを使っているため整合)。concurrencyで同一refの古い実行はキャンセル。aarch64-darwin専用のため、ビルド検証はmacOSランナーが必須。macos-latestはarm64でhostPlatformと一致。補足 / 確認事項
lintは既存.nixファイルがnixfmt-rfc-style整形済みである前提です。未整形のファイルがあれば初回CIで該当箇所が指摘されます(その場合はnix run nixpkgs#nixfmt-rfc-style -- .で整形可能)。cache.nixos.orgの substitute で取得されます。🤖 Generated with Claude Code
Generated by Claude Code