From 15034205197ee7c962540743dc6e0a5d7a7198eb Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Wed, 1 Apr 2026 15:03:20 -0700 Subject: [PATCH] fix(ci): use PostgreSQL in acceptance-tests with dev credentials - Add PostgreSQL service container to acceptance-tests job - Update DATABASE_URL to use euchre_camp_dev:euchreCampDev - Remove SQLite configuration which was incompatible with schema - Simplify environment variable configuration in acceptance-tests --- .gitea/workflows/pr.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index 2b829d0..7ecc541 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -33,9 +33,23 @@ jobs: container: image: docker.notsosm.art/euchre-camp/ci-base:latest options: --user root + services: + postgres: + image: postgres:15-alpine + env: + POSTGRES_DB: euchre_camp_ci + POSTGRES_USER: euchre_camp_dev + POSTGRES_PASSWORD: euchreCampDev + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 env: - DATABASE_PROVIDER: sqlite - DATABASE_URL: file:./prisma/ci.db + DATABASE_PROVIDER: postgresql + DATABASE_URL: postgresql://euchre_camp_dev:euchreCampDev@localhost:5432/euchre_camp_ci BETTER_AUTH_SECRET: test-secret-key-for-ci-only steps: @@ -48,21 +62,13 @@ jobs: - name: Generate Prisma client run: bun x prisma generate env: - DATABASE_URL: postgresql://user:pass@localhost:5432/dummy + DATABASE_URL: postgresql://euchre_camp_dev:euchreCampDev@localhost:5432/euchre_camp_ci - - name: Setup SQLite database - run: | - # Create SQLite database file - mkdir -p prisma - bun x prisma migrate deploy + - name: Setup PostgreSQL database + run: bun x prisma migrate deploy - name: Run acceptance tests run: bun run test:acceptance - env: - DATABASE_PROVIDER: sqlite - DATABASE_URL: file:./prisma/ci.db - BETTER_AUTH_SECRET: test-secret-key-for-ci-only - HOME: /root analyze-bump-type: runs-on: ubuntu-latest