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
This commit is contained in:
+19
-13
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user