Skip to content

fix(ci): build db dep closure before db:generate (DB Migrate)#4

Merged
iamjr15 merged 2 commits into
mainfrom
ci/fix-db-migrate-env-build
Jun 21, 2026
Merged

fix(ci): build db dep closure before db:generate (DB Migrate)#4
iamjr15 merged 2 commits into
mainfrom
ci/fix-db-migrate-env-build

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Fixes the red DB Migrate › diff check. The job ran db:generate before building @cheatcode/env, whose built ./dist/migrate.js is imported by drizzle.config.ts → "Cannot find module". Now builds @cheatcode/db^... first. Verified locally by removing env/dist and reproducing. Also added this workflow to paths so it self-validates here.

The `diff` job ran `db:generate` straight after install, but
drizzle.config.ts imports `@cheatcode/env/migrate` (built ./dist), so it
failed with "Cannot find module @cheatcode/env/dist/migrate.js" on a
fresh runner. Build `@cheatcode/db^...` (its workspace dep closure) first.

Also add this workflow to the pull_request paths so workflow changes
self-validate the diff job.
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cheatcode Ready Ready Preview, Comment Jun 21, 2026 9:43am

db:generate never connects but drizzle.config.ts eagerly requires a URL;
supply a placeholder. The migration-plan step needs a real DB and the
SUPABASE_MIGRATION_URL secret isn't configured, so guard it on the secret
being present. Drift check (generate + git diff) is the gate.
@iamjr15 iamjr15 merged commit 163c570 into main Jun 21, 2026
2 checks passed
@iamjr15 iamjr15 deleted the ci/fix-db-migrate-env-build branch June 21, 2026 14:36
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.

1 participant