Enhance CI workflow to preview generated types and improve error messaging
This commit is contained in:
@@ -21,8 +21,13 @@ jobs:
|
|||||||
- name: Verify generated types are checked in
|
- name: Verify generated types are checked in
|
||||||
run: |
|
run: |
|
||||||
supabase gen types typescript --local > supabase/functions/_shared/database.types.ts
|
supabase gen types typescript --local > supabase/functions/_shared/database.types.ts
|
||||||
|
|
||||||
|
echo "----- Generated types preview -----"
|
||||||
|
head -n 40 supabase/functions/_shared/database.types.ts
|
||||||
|
echo "-----------------------------------"
|
||||||
|
|
||||||
if ! git diff --ignore-space-at-eol --exit-code --quiet supabase/functions/_shared/database.types.ts; then
|
if ! git diff --ignore-space-at-eol --exit-code --quiet supabase/functions/_shared/database.types.ts; then
|
||||||
echo "Detected uncommitted changes after build. See status below:"
|
echo "Detected uncommitted changes after build. See diff below:"
|
||||||
git diff
|
git diff supabase/functions/_shared/database.types.ts
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user