ci: Drizzleスキーマと生成ファイルの同期チェックをCIに追加#115
Merged
KinjiKawaguchi merged 5 commits intodevelopfrom Mar 24, 2026
Merged
Conversation
Closes #114 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Drizzle スキーマ変更後の drizzle-kit generate(= npm run db:generate)未実行・未コミットによる差分を、CIで検知して防止するための変更です。
Changes:
- CI に
drizzle-checkジョブを追加し、npm run db:generate実行後にdrizzle/配下の差分有無をチェック - 差分がある場合にエラーメッセージと
git diff/git statusを出してジョブを失敗させる
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git add -N で intent-to-add にすることで、新規マイグレーションファイルの 内容もCIログに表示されるようにした。 Co-Authored-By: Claude Opus 4.6 (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.
Why
スキーマ変更後に
npm run db:generateを忘れてコミットすると、Drizzleスキーマと生成済みマイグレーションファイルに差異が生じる。これをCIで検出し、未然に防ぐ。What
CIワークフローに
drizzle-checkジョブを追加。drizzle-kit generateを実行しdrizzle/ディレクトリに差分が生じた場合、エラーメッセージとdiffを表示して失敗させる。Test plan
drizzle-checkジョブが正常に通ることCloses #114
🤖 Generated with Claude Code