From 70d9d71a5c4726202d284bfdecbef7da3b72b954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Wed, 25 Mar 2026 00:21:25 +0100 Subject: [PATCH] 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) --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3df822..e4708a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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