LifeMate — Personal, Family & Learning Companion
fix(ci): run backup checks with PostgreSQL 16 and executable scripts
Codex committed
Oct 8, 2026 at 16:39 UTC
7d9366832adaaab4cc3f24ef4d928fddd307fdc9
3 files changed
+8
-5
.github/workflows/ci.yml
+8
-5
@@ -1,7 +1,7 @@
1
name: LifeGuide CI
2
on:
3
push:
4
- branches: [main, 'feat/online-family-stage0']
4
+ branches: [main]
5
pull_request:
6
workflow_dispatch:
7
permissions:
@@ -51,11 +51,14 @@ jobs:
51
- run: npm test && npm run check && npm audit --audit-level=high
52
working-directory: backend
53
- name: Backup and restore synthetic database
54
+ env:
55
+ PG_CONTAINER: ${{ job.services.postgres.id }}
56
run: |
55
- backend/scripts/backup.sh /tmp/lifeguide-ci.dump
56
- createdb -h localhost -U postgres lifeguide_restore
57
- DATABASE_URL=postgresql://postgres:synthetic_ci_only@localhost:5432/lifeguide_restore backend/scripts/restore.sh /tmp/lifeguide-ci.dump
58
- test "$(psql -h localhost -U postgres -d lifeguide_restore -Atc 'select count(*) from schema_migration')" = "$(psql "$DATABASE_URL" -Atc 'select count(*) from schema_migration')"
57
+ docker exec "$PG_CONTAINER" pg_dump --version
58
+ docker exec -i -e DATABASE_URL=postgresql://postgres:synthetic_ci_only@127.0.0.1:5432/lifemate_ci "$PG_CONTAINER" bash -s -- /tmp/lifeguide-ci.dump < backend/scripts/backup.sh
59
+ docker exec "$PG_CONTAINER" createdb -U postgres lifeguide_restore
60
+ docker exec -i -e DATABASE_URL=postgresql://postgres:synthetic_ci_only@127.0.0.1:5432/lifeguide_restore "$PG_CONTAINER" bash -s -- /tmp/lifeguide-ci.dump < backend/scripts/restore.sh
61
+ test "$(docker exec "$PG_CONTAINER" psql -U postgres -d lifeguide_restore -Atc 'select count(*) from schema_migration')" = "$(docker exec "$PG_CONTAINER" psql -U postgres -d lifemate_ci -Atc 'select count(*) from schema_migration')"
62
flutter:
63
runs-on: ubuntu-latest
64
defaults: