ci: speed up test and CI workflow#23
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The -v flag prints every test name and slows test output significantly without adding value when tests pass. Test failures still surface via exit code and stderr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kind create cluster pulls the ~700MB node image every run, dominating the E2E setup time. Cache the image as a docker tarball keyed on the image tag, save it on miss, restore via docker load on hit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kind create cluster waits ~16s for the control plane, and go build . takes ~17s — running them sequentially adds up. Background the build and wait for it after kind comes up so the slower of the two governs the step. Also drops the kind node image cache from the previous commit since docker save/load overhead matched the pull time it was meant to avoid. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
go-build / golangci-lint caches were keyed only on hashFiles('go.sum'),
so after the initial hit the primary key never changed and the cache
stopped accumulating new entries from later commits. When go.sum then
updated (e.g. Go 1.26.2 bump), the entire build cache had to be
rebuilt from scratch.
Add github.sha to the primary key so each commit saves a fresh cache,
and add restore-keys fallback so misses still restore the closest
prior cache (same go.sum first, OS/arch second).
go-mod cache keeps its go.sum-only primary key (modules only change
with go.sum) but gains restore-keys for fallback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit unified the go-build primary key across jobs.
That made the lint job restore the test job's heavier build cache via
restore-keys, regressing lint from ~41s to ~75s (+17s in cache
restore).
Add \${{ github.job }} to the cache key so each job (test, lint,
integration, e2e) maintains its own incremental build cache lineage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Docs-only PRs trigger the full test/lint/integration/e2e pipeline even though no Go code is touched. Use paths-ignore to skip the workflow when only markdown, LICENSE, .gitignore, .tagpr, or CHANGELOG.md changed. Mixed PRs (docs + code) still trigger CI because paths-ignore only skips when every changed path matches the ignore list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Temporary commit to verify CI skips docs-only changes. Will be reverted in the next commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
paths-ignore on pull_request triggers compares against the entire PR diff (base..head), so a docs-only commit pushed to a PR that also has Go changes still triggers CI. The configuration is correct for fresh docs-only PRs; the probe just isn't observable here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
CI と `make test` の所要時間を段階的に削減する一連の改善。各コミットで 1 つずつ手を入れ、warm cache 状態で再計測しながら積み上げました。
入れた改善
計測結果
CI runner の変動 (±30s) が大きいため絶対値での評価は揺れますが、構造的な改善として:
検討したが採用しなかったもの
Test plan
🤖 Generated with Claude Code