LifeMate — Personal, Family & Learning Companion
ci: add Flutter and PostgreSQL quality gates
davoodmehraban89 committed
Oct 5, 2026 at 07:31 UTC
f6f7ef66f39d85ba4850f4cb09b00bdcc9752b84
1 file changed
+58
.github/workflows/ci.yml
new
+58
@@ -0,0 +1,58 @@
1
+name: Phase 2 CI
2
+
3
+on:
4
+ push:
5
+ branches: [main, phase-2/product-foundation-identity]
6
+ pull_request:
7
+
8
+permissions:
9
+ contents: read
10
+
11
+jobs:
12
+ flutter:
13
+ runs-on: ubuntu-latest
14
+ defaults:
15
+ run:
16
+ working-directory: apps/lifemate
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: subosito/flutter-action@v2
20
+ with:
21
+ channel: stable
22
+ cache: true
23
+ - name: Generate platform scaffold
24
+ run: flutter create --platforms=android,web --project-name=lifemate .
25
+ - run: flutter pub get
26
+ - name: Format
27
+ run: dart format --output=none --set-exit-if-changed lib test
28
+ - run: flutter analyze
29
+ - run: flutter test
30
+ - run: flutter build web --release
31
+ - run: flutter build apk --debug
32
+
33
+ postgres:
34
+ runs-on: ubuntu-latest
35
+ services:
36
+ postgres:
37
+ image: postgres:17
38
+ env:
39
+ POSTGRES_PASSWORD: lifemate_ci
40
+ POSTGRES_DB: lifemate_ci
41
+ ports:
42
+ - 5432:5432
43
+ options: >-
44
+ --health-cmd "pg_isready -U postgres -d lifemate_ci"
45
+ --health-interval 5s
46
+ --health-timeout 5s
47
+ --health-retries 10
48
+ env:
49
+ PGPASSWORD: lifemate_ci
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - name: Apply migrations
53
+ run: psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/migrations/0001_identity_family.sql
54
+ - name: Authorization/schema tests
55
+ run: psql -h localhost -U postgres -d lifemate_ci -v ON_ERROR_STOP=1 -f backend/tests/schema_test.sql
56
+ - name: Verify schema objects
57
+ run: |
58
+ 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');")" = "7"