From 68fc3b0f4c984e7f3122669ccb04780aad5e63ee Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Tue, 5 May 2026 08:38:52 +0530 Subject: [PATCH] refactor: inline database environment variable exports --- .github/workflows/ci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc117be..574d146 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,6 @@ on: pull_request: branches: [ main ] -env: - # WHY?: services are executed way before the env can be sourced from .env file - DB_NAME: piku_test_db - DB_USER: test - DB_PASSWORD: password123 - jobs: setup-environment: name: Generate Certificates @@ -40,10 +34,9 @@ jobs: postgres: image: postgres:16-alpine env: - POSTGRES_DB: ${{ env.DB_NAME }} - POSTGRES_USER: ${{ env.DB_USER }} - POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} - PGDATA: /var/lib/postgresql/data/pgdata + POSTGRES_DB: piku_test_db + POSTGRES_USER: test + POSTGRES_PASSWORD: password123 ports: - 5442:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -69,6 +62,10 @@ jobs: cp ../.env.example ../.env uv sync + export DB_NAME="piku_test_db" + export DB_USER="test" + export DB_PASSWORD="password123" + if [ "$GITEA_ACTIONS" = "true" ]; then export DB_HOST="postgres" export DB_PORT="5432"