fix: make DATABASE_URL available to all CI steps and add prisma verify

- Move DATABASE_URL to workflow-level env so all steps can access it
- Add verification step to confirm prisma generate creates output files
- This should fix TS2307 'Cannot find module @/generated/prisma' in CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
xCyanGrizzly
2026-02-18 17:13:30 +01:00
parent 36d403cef5
commit c7a9b78ffb

View File

@@ -6,6 +6,9 @@ on:
pull_request:
branches: [main]
env:
DATABASE_URL: postgresql://dragons:stash@localhost:5432/dragonsstash
jobs:
lint-and-build:
runs-on: ubuntu-latest
@@ -41,10 +44,11 @@ jobs:
- name: Generate Prisma client
run: npx prisma generate
- name: Verify Prisma client generated
run: ls -la src/generated/prisma/
- name: Run database migrations
run: npx prisma migrate deploy
env:
DATABASE_URL: postgresql://dragons:stash@localhost:5432/dragonsstash
- name: Type check
run: npx tsc --noEmit
@@ -52,7 +56,6 @@ jobs:
- name: Build
run: npm run build
env:
DATABASE_URL: postgresql://dragons:stash@localhost:5432/dragonsstash
AUTH_SECRET: ci-test-secret-not-for-production
AUTH_TRUST_HOST: "true"
NEXT_PUBLIC_APP_URL: http://localhost:3000