From c7a9b78ffb7381572a6ffc5e7346d2b852f27c08 Mon Sep 17 00:00:00 2001 From: xCyanGrizzly Date: Wed, 18 Feb 2026 17:13:30 +0100 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6479931..81fd32f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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