From c8792a2d52a72405b79544a23a389018386308ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Wed, 13 Nov 2024 17:53:13 +0100 Subject: [PATCH] Create test DB in CI --- .github/workflows/ci-server.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-server.yaml b/.github/workflows/ci-server.yaml index 2d4182b36496..f36f95d154c7 100644 --- a/.github/workflows/ci-server.yaml +++ b/.github/workflows/ci-server.yaml @@ -63,6 +63,8 @@ jobs: - name: Server / Write .env if: steps.changed-files.outputs.any_changed == 'true' run: npx nx reset:env twenty-server + - name: Server / Create DB + run: PGPASSWORD=twenty psql -h localhost -p 5432 -U twenty -d postgres -c "SELECT 'CREATE DATABASE test' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'test')" - name: Worker / Run if: steps.changed-files.outputs.any_changed == 'true' run: npx nx run twenty-server:worker:ci