Headless Basejump migration #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PGTap Tests | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: --git https://github.com/supabase/dbdev.git dbdev | |
- uses: actions/checkout@v3 | |
- uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Supabase Start | |
run: supabase init && supabase start | |
- name: Install supabase_test_helpers from scripts/install-dbdev-with-test-helpers.sql (remove this once remote install enabled in dbdev CLI) | |
run: psql -v ON_ERROR_STOP=1 -U postgres -d postgres -h localhost -p 54322 -f ./scripts/install-dbdev-with-test-helpers.sql | |
env: | |
PGPASSWORD: postgres | |
- name: Install core extension using dbdev cli | |
run: | | |
dbdev install --connection postgres://postgres:postgres@localhost:54322/postgres --path . | |
psql -v ON_ERROR_STOP=1 -U postgres -d postgres -h localhost -p 54322 -c 'CREATE EXTENSION IF NOT EXISTS basejump_core with schema extensions;' | |
env: | |
PGPASSWORD: postgres | |
- name: Run Tests | |
run: supabase test db |