Skip to content

ci: add flake build + nixfmt checks on PRs#62

Merged
rin2yh merged 2 commits into
mainfrom
claude/dependabot-review-merge-o3f838
Jun 27, 2026
Merged

ci: add flake build + nixfmt checks on PRs#62
rin2yh merged 2 commits into
mainfrom
claude/dependabot-review-merge-o3f838

Conversation

@rin2yh

@rin2yh rin2yh commented Jun 27, 2026

Copy link
Copy Markdown
Owner

概要

PR時に走るCIワークフロー (.github/workflows/ci.yml) を追加します。主目的は、dependabotなどによる依存更新で flake の評価・ビルドが壊れていないかを自動検知することです。

これまでこのリポジトリにはCIがなく、依存更新のマージ可否を手動で判断するしかありませんでした。

内容

トリガー: main 宛の pull request、および workflow_dispatch(手動実行)。

ジョブ ランナー 内容
lint ubuntu-latest .nix ファイルが nixfmt-rfc-style の整形に従っているか --check で検証
build macos-latest aarch64-darwindarwinConfigurations.default.system を実際にビルドし、flakeの評価エラーやパッケージ更新による破壊を検出
  • Nixのインストールは DeterminateSystems/nix-installer-action(リポジトリのMakefileがDeterminateインストーラを使っているため整合)。
  • concurrency で同一refの古い実行はキャンセル。
  • 構成が aarch64-darwin 専用のため、ビルド検証はmacOSランナーが必須。macos-latest はarm64で hostPlatform と一致。

補足 / 確認事項

  • ビルドジョブはmacOSランナーを消費します(PR時のみ実行)。
  • lint は既存 .nix ファイルが nixfmt-rfc-style 整形済みである前提です。未整形のファイルがあれば初回CIで該当箇所が指摘されます(その場合は nix run nixpkgs#nixfmt-rfc-style -- . で整形可能)。
  • 外部キャッシュ(Magic Nix Cache はサービス終了済み)には依存していません。初回ビルドは時間がかかりますが、大半は cache.nixos.org の substitute で取得されます。

🤖 Generated with Claude Code


Generated by Claude Code

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
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
- 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
@rin2yh rin2yh marked this pull request as ready for review June 27, 2026 13:53
@rin2yh rin2yh merged commit 029ab3b into main Jun 27, 2026
2 checks passed
@rin2yh rin2yh deleted the claude/dependabot-review-merge-o3f838 branch June 27, 2026 13:53
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