forked from AnnabelJoe/solarproof
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1 KB
/
supabase.yml
File metadata and controls
45 lines (38 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Supabase schema
on:
push:
branches: [main, develop]
paths:
- 'supabase/**'
pull_request:
branches: [main, develop]
paths:
- 'supabase/**'
jobs:
validate:
name: Validate migrations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Start Supabase local stack
run: supabase start
- name: Apply all migrations (forward)
run: supabase db reset
- name: Verify rollback scripts exist for every migration
run: |
missing=0
for f in supabase/migrations/*.sql; do
base=$(basename "$f" .sql)
down="supabase/migrations/rollbacks/${base}.down.sql"
if [ ! -f "$down" ]; then
echo "Missing rollback: $down"
missing=1
fi
done
exit $missing
- name: Stop Supabase local stack
if: always()
run: supabase stop