fix: CI wait for postgres + better error handling
This commit is contained in:
parent
2ecd0bbc33
commit
bba8d113e4
1 changed files with 8 additions and 0 deletions
|
|
@ -40,6 +40,14 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync
|
run: uv sync
|
||||||
|
|
||||||
|
- name: Wait for Postgres
|
||||||
|
run: |
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
python -c "import socket; s=socket.create_connection(('postgres',5432),2); s.close(); print('Postgres ready')" 2>/dev/null && break
|
||||||
|
echo "Waiting for Postgres... ($i)"
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest -v --tb=short
|
run: uv run pytest -v --tb=short
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue