From 24cfbc44af0a27f9dc46949a62dd939d009a00bc Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 7 Mar 2026 13:39:36 -0600 Subject: [PATCH] fix: set DATABASE_HOST at job level for all steps --- .forgejo/workflows/production.yaml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.forgejo/workflows/production.yaml b/.forgejo/workflows/production.yaml index 27431749..a1e1f97b 100644 --- a/.forgejo/workflows/production.yaml +++ b/.forgejo/workflows/production.yaml @@ -13,6 +13,10 @@ jobs: test-exunit: name: Run ExUnit Tests runs-on: ubuntu-22.04 + env: + MIX_ENV: test + DATABASE_HOST: postgres + DATABASE_PORT: 5432 services: postgres: @@ -69,22 +73,18 @@ jobs: - name: Compile (warnings as errors) run: mix compile --warnings-as-errors - env: - MIX_ENV: test - DATABASE_HOST: postgres - DATABASE_PORT: 5432 - name: Run tests run: mix test - env: - MIX_ENV: test - DATABASE_HOST: postgres - DATABASE_PORT: 5432 test-e2e: name: Run E2E Tests runs-on: ubuntu-22.04 needs: test-exunit + env: + MIX_ENV: dev + DATABASE_HOST: postgres + DATABASE_PORT: 5432 services: postgres: @@ -160,17 +160,10 @@ jobs: - name: Setup database run: mix ecto.setup - env: - MIX_ENV: dev - DATABASE_HOST: postgres - DATABASE_PORT: 5432 - name: Start Phoenix server in background run: mix phx.server & env: - MIX_ENV: dev - DATABASE_HOST: postgres - DATABASE_PORT: 5432 SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE || 'dev_secret_key_base_for_testing_only_min_64_chars_required_here' }} PHX_HOST: localhost