Fix CI: wait for PostGIS extension before schema push
pg_isready reports true before PostGIS extension is initialized. Added a second wait loop that queries PostGIS_Version() to ensure the extension is fully loaded before running drizzle-kit push. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1d45c57ae7
commit
70d9d71a5c
1 changed files with 6 additions and 1 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -102,11 +102,16 @@ jobs:
|
|||
-e POSTGRES_DB=trails \
|
||||
-p 5432:5432 \
|
||||
postgis/postgis:16-3.4
|
||||
# Wait for health
|
||||
# Wait for pg_isready
|
||||
for i in $(seq 1 30); do
|
||||
docker exec postgres pg_isready -U trails > /dev/null 2>&1 && break
|
||||
sleep 1
|
||||
done
|
||||
# Wait for PostGIS extension to be ready
|
||||
for i in $(seq 1 10); do
|
||||
docker exec postgres psql -U trails -c "SELECT PostGIS_Version();" > /dev/null 2>&1 && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Push database schema
|
||||
run: pnpm db:push
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue