LifeMate — Personal, Family & Learning Companion
ci: add backup restore and release readiness gates
davoodmehraban89 committed
Oct 5, 2026 at 17:12 UTC
2ac88fe91523a19cdf598eaf15a942ee12e1717f
1 file changed
+18
.github/workflows/ci.yml
+18
@@ -43,6 +43,13 @@ jobs:
43
- run: dart format lib test
44
- run: flutter analyze
45
- run: flutter test
46
+ - name: Verify PWA release metadata
47
+ run: |
48
+ grep -q 'manifest.json' web/index.html
49
+ grep -q 'theme-color' web/index.html
50
+ grep -q 'apple-touch-icon' web/index.html
51
+ grep -q 'dir="rtl"' web/index.html
52
+ test -f web/manifest.json
53
- run: flutter build web --release
54
- run: flutter build apk --debug
55
@@ -90,6 +97,17 @@ jobs:
97
- name: Backend tests
98
working-directory: backend
99
run: npm test
100
+ - name: Backend syntax checks
101
+ working-directory: backend
102
+ run: npm run check
103
- name: Verify schema objects
104
run: |
105
test "$(psql -h localhost -U postgres -d lifemate_ci -Atc "select count(*) from information_schema.tables where table_schema='public' and table_name in ('app_user','profile','family_workspace','family_membership','guardian_relationship','family_invitation','access_audit','auth_credential','auth_token','auth_session','life_context','academic_year','academic_term','subject','class_session','plan_item','sharing_grant','reminder','notification_preference','notification_outbox','sync_mutation','learning_goal','learning_checkin','wellbeing_checkin','ai_guide_session','ai_guide_message','ai_plan_proposal','wellbeing_safety_event');")" = "28"
106
+ - name: Backup and restore drill
107
+ run: |
108
+ psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/scripts/restore-smoke.sql
109
+ chmod +x backend/scripts/backup.sh backend/scripts/restore.sh
110
+ backend/scripts/backup.sh /tmp/lifemate-ci.dump
111
+ createdb -h localhost -U postgres lifemate_restore
112
+ DATABASE_URL=postgresql://postgres:lifemate_ci@localhost:5432/lifemate_restore backend/scripts/restore.sh /tmp/lifemate-ci.dump
113
+ test "$(psql -h localhost -U postgres -d lifemate_restore -Atc "select count(*) from profile where display_name='Restore Smoke';")" = "1"