File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 POSTGRES_DB : radioshaq
3232 ports :
3333 - 5434:5432
34- options : >-
35- --health-cmd "pg_isready -U radioshaq -d radioshaq"
36- --health-interval 5s
37- --health-timeout 5s
38- --health-retries 5
3934 steps :
4035 - uses : actions/checkout@v6
4136 - uses : actions/setup-node@v6
5550 - uses : astral-sh/setup-uv@v7
5651 - name : Install dependencies
5752 run : cd radioshaq && uv sync --extra dev --extra test --extra sdr
53+ - name : Wait for Postgres
54+ run : |
55+ for i in $(seq 1 30); do
56+ if python -c "import socket; s=socket.socket(); s.settimeout(2); s.connect(('127.0.0.1',5434)); s.close()" 2>/dev/null; then
57+ echo "Postgres is ready on 127.0.0.1:5434"
58+ break
59+ fi
60+ echo "Waiting for Postgres... ($i/30)"
61+ sleep 2
62+ done
63+ python -c "import socket; s=socket.socket(); s.settimeout(5); s.connect(('127.0.0.1',5434)); s.close(); print('Postgres port open')"
5864 - name : Run database migrations
5965 run : cd radioshaq && uv run alembic-upgrade
6066 - name : Run tests
You can’t perform that action at this time.
0 commit comments