refactor: inline database environment variable exports
CI / Generate Certificates (push) Successful in 26s
CI / Frontend CI (push) Successful in 1m7s
CI / E2E Tests (push) Has been skipped
CI / Backend CI (push) Failing after 53s

This commit is contained in:
ramvignesh-b
2026-05-05 08:38:52 +05:30
parent c1055badb9
commit 68fc3b0f4c
+7 -10
View File
@@ -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"