Skip to content

Commit

Permalink
adjust port
Browse files Browse the repository at this point in the history
  • Loading branch information
djeck1432 committed Nov 28, 2024
1 parent c9588fe commit 4199a87
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/dashboard_app_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
run: poetry run pytest

0 comments on commit 4199a87

Please sign in to comment.