From f0d9793fc359a412f426295e7da6b0bc6379ae47 Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Mon, 4 May 2026 23:48:45 +0530 Subject: [PATCH] ci: refactor database environment variable configuration for Gitea Actions compatibility --- .github/workflows/ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d2d57e..5dbb20f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,6 @@ env: DB_NAME: piku_test_db DB_USER: test DB_PASSWORD: password123 - DB_HOST: 127.0.0.1 - DB_PORT: 5442 jobs: setup-environment: @@ -95,13 +93,19 @@ jobs: path: certs key: certs-${{ runner.os }}-${{ github.sha }} - - name: Setup DB connection Variables + - name: Lint & Test run: | cp ../.env.example ../.env uv sync - - - name: Lint & Test - run: | + + if [ "$GITEA_ACTIONS" = "true" ]; then + export DB_HOST="postgres" + export DB_PORT="5432" + else + export DB_HOST="127.0.0.1" + export DB_PORT="5442" + fi + uv run ruff check uv run python manage.py test