Repository navigation
chore: speedup ci and typecheck - #4200
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generated $app/tsconfig sets noEmit, so outDir, sourceMap, and incremental have no effect; outDir also breaks svelte-check --tsgo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin each action to the commit its current major tag points to, and let Renovate keep the digests and version comments up to date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vercel build already runs install and the build command, so the prior pnpm build was redundant. Run prisma migrate deploy after vercel build to keep migrations gated on a successful build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Every job ran the same pnpm, Node.js, and install steps; keep them and their pinned SHAs in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
None of them uses the build output, so split them out of the build job and make the deploy jobs wait for all four. The build job keeps its matrix so the existing build (24) check name stays the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CI と型チェックの高速化、actions の SHA 固定
概要
Kit 3 への移行の後、「build・check が遅い」という相談を受け、時間の内訳を測って効く所だけを直した。
あわせて、GitHub Actions の action を commit SHA に固定した。
branch
ci-and-typecheck-speedupで実装済み(2026-10-21)。tsgo による型チェックの高速化は後回しにし、TASK.md に移した。
pnpm lintの prettier に--cacheを付けたtsconfig.jsonから効いていない3項目を消したbuildの段 1分19秒 → 約42秒(見込み)pnpm buildを消したCI 全体は 2分21秒〜2分50秒 → 約1分30秒〜2分の見込み。実測は PR の CI で行う。
判断と根拠
Phase 3: SHA 固定
actions/*も含めて3つとも固定した。pnpm/action-setupは annotated tag なので、tag が指す commit(git ls-remoteの^{}の行)を使った。helpers:pinGitHubActionDigestsToSemverが、SHA とコメントの版を一緒に書き換える。Phase 4: ジョブの並列化
node_modules/$app/は build ではなくsvelte-kit syncが生成し、check と unit test はそれぞれ自分で sync を実行する。pnpm installの後に1つずつ単独で実行し、3つとも成功した。buildジョブだけ matrix を残し、既存の check 名build (24)を変えていない。build (24)に出なくなるので、required checks にlint・check・unit-testを追加した。Phase 2: tsconfig の3項目
outDir・sourceMap・incrementalは、TypeScript がファイルを出力するとき(またはtscを直接実行するとき)だけ効く。Kit が生成する$app/tsconfigがnoEmit: trueで、tscを直接実行する所も無いので、どれも効いていなかった。outDirは svelte-check の--tsgoを壊していた(「rootDir の外」のエラー)。tsgo は後回しにしたが、この削除は先に入れた。.vercel/output)は adapter-vercel が決めるので、outDir: "build"とは関係しない。Phase 5: deploy のジョブの重複
vercel buildが install とvite buildを自分で行うので、その前のpnpm buildは重複していた。2024 年に migration の step と一緒に追加されたもので、必要だった記録は無い。prisma migrate deployをvercel buildの後に移し、「build が失敗したら DB を変えない」を保った。採らなかった案
--incremental: 2回目でも 4.1 秒で、tsgo(2.6 秒)より遅い。prisma generateの調整: それぞれ数秒で、削れる余地が小さい。actions.lock): SHA 固定より強いが、GitHub 側は public preview、Renovate の対応も experimental。残りの確認(人が行う)
vercel.jsonには指定が無い)。後で決めること
--cache: 測ってから判断する。確認限界
build (24)の1回分の時間からの計算。vercel buildそのものは token が要るので実行しておらず、vite buildまでで確かめた。付録: 計測(2026-10-19、devcontainer)
pnpm buildprisma generate1.8 秒pnpm lintpnpm checkpnpm test:unitstagingの直近10回は、全体で 2分21秒〜2分50秒。build (24)ジョブは 1分19秒。うち setup などジョブごとの固定分が約29秒、Build・Lint・Check・Unit test の本体が順に計48秒。Summary by CodeRabbit
改善
開発体験
設定