mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-11 06:11:15 +00:00
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:
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user