From 4199a87c09e50e1cd06a45902d7cbd32a69392cd Mon Sep 17 00:00:00 2001 From: djeck1432 Date: Thu, 28 Nov 2024 21:10:25 +0100 Subject: [PATCH] adjust port --- .github/workflows/dashboard_app_ci.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dashboard_app_ci.yaml b/.github/workflows/dashboard_app_ci.yaml index b7675653..f75e11c7 100644 --- a/.github/workflows/dashboard_app_ci.yaml +++ b/.github/workflows/dashboard_app_ci.yaml @@ -30,26 +30,31 @@ jobs: run: | curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Install dependencies for Dashboard App working-directory: ./apps/dashboard_app run: | echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV poetry lock --no-update poetry install + - name: Prepare Environment File working-directory: ./apps/dashboard_app run: | cp .env.dev .env sed -i 's/DB_HOST=db/DB_HOST=127.0.0.1/' .env - sed -i 's/DB_PORT=5432/DB_PORT=5432/' .env + sed -i 's/DB_PORT=5432/DB_PORT=5433/' .env # Update DB_PORT to match the exposed port + - name: Wait for Database to be Ready run: | for i in {1..30}; do pg_isready -h 127.0.0.1 -p 5433 -U postgres && break || sleep 2; done + - name: Create Test Database run: | PGPASSWORD=postgres psql -h 127.0.0.1 -p 5433 -U postgres -c "CREATE DATABASE dashboard_app;" + - name: Run Tests for Dashboard_App working-directory: ./apps/dashboard_app - run: poetry run pytest \ No newline at end of file + run: poetry run pytest