fix: set DATABASE_URL at job level for unit tests in PR workflow
Pull Request / unit-tests (pull_request) Successful in 54s
Pull Request / build-and-deploy-ci (pull_request) Failing after 0s
Pull Request / analyze-bump-type (pull_request) Successful in 10s

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'.
This commit is contained in:
2026-05-16 20:35:52 -07:00
parent 83cccf4987
commit 66fc2386c2
+2 -2
View File
@@ -15,6 +15,8 @@ jobs:
container: container:
image: docker.notsosm.art/euchre-camp/ci-base:latest image: docker.notsosm.art/euchre-camp/ci-base:latest
options: --user root options: --user root
env:
DATABASE_URL: postgresql://user:pass@localhost:5432/dummy
steps: steps:
- name: Checkout code - name: Checkout code
@@ -25,8 +27,6 @@ jobs:
- name: Generate Prisma client - name: Generate Prisma client
run: bun x prisma generate run: bun x prisma generate
env:
DATABASE_URL: postgresql://user:pass@localhost:5432/dummy
- name: Run unit tests - name: Run unit tests
run: bun test src/__tests__/unit/ src/__tests__/*.test.tsx src/__tests__/auth-simple.test.ts run: bun test src/__tests__/unit/ src/__tests__/*.test.tsx src/__tests__/auth-simple.test.ts