-
Notifications
You must be signed in to change notification settings - Fork 66
35 lines (35 loc) · 1.27 KB
/
pg_tests.yml
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
name: PGTap Tests
on:
pull_request:
branches: [ main ]
jobs:
dbdev:
uses: ./.github/workflows/dbdev.yml
tests:
name: PGTap Tests
runs-on: ubuntu-latest
needs: dbdev
steps:
- name: Download DBDev
uses: actions/download-artifact@master
with:
name: dbdev-output
path: ~/.cargo/bin/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: |
~/.cargo/bin/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