Repository navigation
ci: run Go tools from the flake dev shell - #7
Conversation
CI will run the Go tools from this dev shell on Linux runners. Refs furedea/reusable-workflows#23 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace setup-go and golangci-lint-action with the nix-setup composite action and run every step in nix develop. Refs: furedea/reusable-workflows#23 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| defaults: | ||
| run: | ||
| shell: bash | ||
| shell: nix develop --command bash -eo pipefail {0} |
There was a problem hiding this comment.
[P3] This workflow-level default shell now also applies to all-green, which runs on a bare ubuntu-latest with no checkout and no Nix. Today its only step is exit 1, so the job still fails when it should — but it fails because nix: command not found, not because of the exit 1. That hides why it failed, and any step added to that job later would break too. Consider moving this defaults.run.shell onto the Nix-using jobs (lint/format/test/audit), or setting defaults: run: shell: bash on all-green.
There was a problem hiding this comment.
Valid, fixed in the next commit: all-green now sets defaults.run.shell to bash, so a failure there reports the exit 1 and not a missing nix. It passed here only because its single step was skipped.
Review summaryNo blocking findings (0 P0, 0 P1).
Other checks:
🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The workflow default shell needs Nix, which all-green does not install, so a failure there would print nix: command not found. Refs: furedea/reusable-workflows#23 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@codex review |
Review summaryNo blocking findings. What I checked:
Non-blocking note: 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
概要
CI の Go ツールを,flake の devShell から動かす形にする.手元と CI で同じ版になり,flake.lock で内容が固定される.
aarch64-darwinのみaarch64-darwinとx86_64-linuxactions/setup-gonix-setup(reusable-workflows v1.3.0)golangci-lint-action(v2.15.0 固定)shell: bashnix develop --command bash -eo pipefail {0}job 名と
all-greenのneedsは変えていない.検証
ローカルの
nix develop内で,golangci-lint run,golangci-lint fmt --diff,go test -race -cover ./...,go mod tidy -diff,deadcode,govulncheckが通ることを確認した.nix flake check --all-systems --no-build --option allow-import-from-derivation falseも通った.CI の時間
変更前は main の run 42259359914,変更後はこの PR の最初の run 42621073133(Nix のキャッシュがまだなく,store を全部取得した初回).
job は並列なので,全体の待ち時間は約 14 秒延びた.PR の run はキャッシュを保存しないため,この数字は常に初回相当になる.main に入った後の run がキャッシュを保存し,それ以降の run で短くなる見込み.main での実測は merge 後に確認する.
レビューへの対応
claude-review の P3(
all-greenが Nix のない素の runner で動くのに,workflow の既定の shell がnix developになる)は妥当だったので,all-greenにdefaults.run.shell: bashを足した(c05ff54).codex-review の指摘はなし.Refs furedea/reusable-workflows#23
🤖 Generated with Claude Code