From 66fc2386c27262cec6ed1f4f44b965730e9cc512 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Sat, 16 May 2026 20:35:52 -0700 Subject: [PATCH] fix: set DATABASE_URL at job level for unit tests in PR workflow prisma.ts throws at import time if DATABASE_URL is not set. The env var was only set on the 'Generate Prisma client' step, not 'Run unit tests'. --- .gitea/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index 0ee1aa0..5f54b6b 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -15,6 +15,8 @@ jobs: container: image: docker.notsosm.art/euchre-camp/ci-base:latest options: --user root + env: + DATABASE_URL: postgresql://user:pass@localhost:5432/dummy steps: - name: Checkout code @@ -25,8 +27,6 @@ jobs: - name: Generate Prisma client run: bun x prisma generate - env: - DATABASE_URL: postgresql://user:pass@localhost:5432/dummy - name: Run unit tests run: bun test src/__tests__/unit/ src/__tests__/*.test.tsx src/__tests__/auth-simple.test.ts