Skip to content

Feature/1.2.2.5/allow-local-supabase-development #19

Feature/1.2.2.5/allow-local-supabase-development

Feature/1.2.2.5/allow-local-supabase-development #19

Workflow file for this run

# If you run into issues with this workflow, make sure
# that your Supabase CLI is up to date, then run
# `supabase stop --no-backup` - careful, this will delete all records in your local database
# `supabase db start` - This will apply the migration files
# `supabase gen types typescript --local > supabase/database.types.ts`
# that will create the database types for TypeScript.
# For more information, check out this link:
# https://supabase.com/docs/guides/cli/github-action/generating-types
name: 'generate-types'
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code so it can be tested
uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Set env vars
run: |
echo "SUPABASE_AUTH_GOOGLE_CLIENT_ID=fake_data" >> "$GITHUB_ENV"
echo "SUPABASE_AUTH_GOOGLE_SECRET=fake_data" >> "$GITHUB_ENV"
echo "SUPABASE_AUTH_GOOGLE_REDIRECT_URI=fake_data" >> "$GITHUB_ENV"
echo "SUPABASE_AUTH_AZURE_CLIENT_ID=fake_data" >> "$GITHUB_ENV"
echo "SUPABASE_AUTH_AZURE_SECRET=fake_data" >> "$GITHUB_ENV"
echo "SUPABASE_AUTH_AZURE_REDIRECT_URI=fake_data" >> "$GITHUB_ENV"
- run: supabase db start
- name: Verify generated types match Postgres schema
run: |
supabase gen types typescript --local > supabase/database.types.ts
if ! git diff --ignore-space-at-eol --exit-code --quiet supabase/database.types.ts; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi