ci(forgejo): create PostGIS extension before db:push + wipe stale DinD state
Some checks failed
CI / Dockerfile Package Check (push) Successful in 34s
CI / Security Scan (push) Successful in 2m36s
CI / OpenSpec Validate (push) Successful in 3m12s
CI / Typecheck (push) Successful in 4m39s
CI / Lint (push) Successful in 5m4s
CI / Unit Tests (push) Successful in 4m40s
CI / Build (push) Successful in 3m35s
CI / Journal Image Smoke Test (push) Failing after 4m18s
CI / E2E Tests (push) Failing after 2m30s
CI / Visual Tests (push) Successful in 10m3s
Some checks failed
CI / Dockerfile Package Check (push) Successful in 34s
CI / Security Scan (push) Successful in 2m36s
CI / OpenSpec Validate (push) Successful in 3m12s
CI / Typecheck (push) Successful in 4m39s
CI / Lint (push) Successful in 5m4s
CI / Unit Tests (push) Successful in 4m40s
CI / Build (push) Successful in 3m35s
CI / Journal Image Smoke Test (push) Failing after 4m18s
CI / E2E Tests (push) Failing after 2m30s
CI / Visual Tests (push) Successful in 10m3s
- Ensure PostGIS: the postgis image doesn't auto-create the extension in POSTGRES_DB, so drizzle-kit push's geometry columns died silently (behind its spinner). Create it explicitly before db:push in e2e + image-smoke. - e2e: wipe leftover containers/volumes on the persistent per-slot DinD at job start (stale pgdata left postgres unhealthy). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6f2c1d8492
commit
e9d1db1fc9
1 changed files with 20 additions and 4 deletions
|
|
@ -209,6 +209,14 @@ jobs:
|
|||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Clean this runner's DinD (fresh state per job)
|
||||
# The per-slot DinD persists across jobs, so wipe leftover containers +
|
||||
# volumes from a previous run (a stale pgdata leaves postgres unhealthy).
|
||||
# Safe: this DinD only ever runs CI containers for this one runner.
|
||||
run: |
|
||||
docker rm -f $(docker ps -aq) 2>/dev/null || true
|
||||
docker volume rm -f trails_brouter_segments trails_pgdata 2>/dev/null || true
|
||||
|
||||
- name: Seed BRouter segment volume
|
||||
# Download the segment directly into the compose volume via a DinD
|
||||
# container — a job-side download + bind mount would not be visible to
|
||||
|
|
@ -241,9 +249,13 @@ jobs:
|
|||
sleep 2
|
||||
done
|
||||
|
||||
- name: Ensure PostGIS extension
|
||||
# The postgis image does NOT auto-create the extension in POSTGRES_DB,
|
||||
# so drizzle-kit push's geometry columns fail (silently, behind its
|
||||
# spinner). Create it first (trails is superuser in the image).
|
||||
run: node -e "const{Client}=require('pg');const c=new Client(process.env.DATABASE_URL);c.connect().then(()=>c.query('CREATE EXTENSION IF NOT EXISTS postgis')).then(()=>console.log('postgis ready')).catch(e=>{console.error(e.message);process.exit(1)}).finally(()=>c.end())"
|
||||
|
||||
- name: Push database schema
|
||||
# Pipe through cat so drizzle-kit prints plain output (no TTY spinner
|
||||
# that hides the real error) and we see any failure.
|
||||
run: pnpm db:push 2>&1 | cat
|
||||
|
||||
- name: Seed database
|
||||
|
|
@ -351,9 +363,13 @@ jobs:
|
|||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Ensure PostGIS extension
|
||||
# The postgis image does NOT auto-create the extension in POSTGRES_DB,
|
||||
# so drizzle-kit push's geometry columns fail (silently, behind its
|
||||
# spinner). Create it first (trails is superuser in the image).
|
||||
run: node -e "const{Client}=require('pg');const c=new Client(process.env.DATABASE_URL);c.connect().then(()=>c.query('CREATE EXTENSION IF NOT EXISTS postgis')).then(()=>console.log('postgis ready')).catch(e=>{console.error(e.message);process.exit(1)}).finally(()=>c.end())"
|
||||
|
||||
- name: Push database schema
|
||||
# Pipe through cat so drizzle-kit prints plain output (no TTY spinner
|
||||
# that hides the real error) and we see any failure.
|
||||
run: pnpm db:push 2>&1 | cat
|
||||
|
||||
- name: Build journal runtime image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue