@davoodmehraban89 / LifeMate / commits / 4eccf67
Fork 0

LifeMate — Personal, Family & Learning Companion

ci: validate all migrations including phase 4

davoodmehraban89 committed Oct 5, 2026 at 16:13 UTC 4eccf67fa9b24c876e3a7a82e212bb2b8aa7ead4
1 file changed +9 -5
.github/workflows/ci.yml
+9 -5
@@ -1,4 +1,4 @@
1 -name: Phase 3 CI
1 +name: LifeMate CI
2
3 on:
4 push:
@@ -70,13 +70,17 @@ jobs:
70 node-version: 22
71 - name: Apply migrations
72 run: |
73 - psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/migrations/0001_identity_family.sql
74 - psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/migrations/0002_auth.sql
75 - psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/migrations/0003_planner_school_family.sql
73 + for migration in backend/migrations/*.sql; do
74 + echo "Applying $migration"
75 + psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f "$migration"
76 + done
77 - name: Database authorization tests
78 run: |
79 psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/tests/schema_test.sql
80 psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/tests/phase3_schema_test.sql
81 + if [ -f backend/tests/phase4_schema_test.sql ]; then
82 + psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/tests/phase4_schema_test.sql
83 + fi
84 - name: Install backend
85 working-directory: backend
86 run: npm install
@@ -88,4 +92,4 @@ jobs:
92 run: npm test
93 - name: Verify schema objects
94 run: |
91 - 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');")" = "21"
95 + 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"