From 8b2f9e42850a220ef72fe6eb6856b99a656d2102 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Tue, 18 Feb 2025 18:41:24 +0100 Subject: [PATCH] fix: don't use env.docker-compose in ci directly --- .github/workflows/ci.yml | 5 +---- .github/workflows/e2e.yml | 7 +------ core/package.json | 3 ++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b396bbcb..37565ca67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,9 +48,6 @@ jobs: restore-keys: | ${{ runner.os }}-pnpm-store- - - name: Setup env file - run: cat ${{ env.ENV_FILE }} >> $GITHUB_ENV - - name: Cache turbo uses: actions/cache@v4 with: @@ -60,7 +57,7 @@ jobs: ${{ runner.os }}-turbo- - name: Start test dependencies - run: docker compose -f docker-compose.test.yml --profile test up -d + run: pnpm test:setup - name: Install dependencies run: pnpm install --frozen-lockfile --prefer-offline diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a0b842786..ffbcaf803 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -50,10 +50,6 @@ jobs: restore-keys: | ${{ runner.os }}-pnpm-store- - - name: Setup env file - id: setup-env-file - run: cat ${{ env.ENV_FILE }} >> $GITHUB_OUTPUT - - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -91,9 +87,8 @@ jobs: run: pnpm p:build - name: Run migrations and seed - run: pnpm --filter core exec prisma migrate reset --preview-feature --force + run: pnpm --filter core db:test:reset env: - DATABASE_URL: postgresql://${{ steps.setup-env-file.outputs.POSTGRES_USER }}:${{ steps.setup-env-file.outputs.POSTGRES_PASSWORD }}@localhost:${{ steps.setup-env-file.outputs.POSTGRES_PORT }}/${{ steps.setup-env-file.outputs.POSTGRES_DB }} # 20241126: this prevents the arcadia seed from running, which contains a ton of pubs which potentially might slow down the tests MINIMAL_SEED: true SKIP_VALIDATION: true diff --git a/core/package.json b/core/package.json index 337f94f78..e5355f625 100644 --- a/core/package.json +++ b/core/package.json @@ -12,7 +12,8 @@ "db:migrate-deploy": "pnpm migrate-deploy", "db:migrate-diff": "pnpm migrate-diff", "db:migrate-docker": "pnpm migrate-docker", - "db:migrate-test": "pnpm migrate-test", + "db:test:migrate": "pnpm migrate-test", + "db:test:reset": "dotenv -e .env.test -- prisma migrate reset --preview-feature --force | pino-pretty", "db:prisma": "pnpm prisma", "db:studio": "pnpm prisma studio", "db:generate-history-table": "pnpm exec tsx prisma/scripts/history-tables/generate-history-table.mts",