Merge pull request #13 from ZeroGachis/fix_schema #28
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
# .github/workflows/schema.yml | |
name: Dedicated schema | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [ '16', '17' ] | |
container: pgxn/pgxn-tools | |
env: | |
PGUSER: postgres | |
steps: | |
- run: pg-start ${{ matrix.version }} | |
- uses: actions/checkout@main | |
# Basic regression test. | |
- name: install dependency from pgxn.org | |
run: pgxn install ddl_historization | |
- name: create schema | |
run: >- | |
psql --host localhost --username postgres --dbname postgres \ | |
-c 'CREATE SCHEMA dba' | |
env: | |
PGPASSWORD: postgres | |
- name: create extension ddl_historization | |
run: >- | |
psql --host localhost --username postgres --dbname postgres \ | |
-c 'CREATE EXTENSION ddl_historization WITH SCHEMA dba' | |
env: | |
PGPASSWORD: postgres | |
- name: build application | |
run: make TEST_SCHEMA=dba | |
- name: install extension | |
run: make install | |
- name: create extension schedoc | |
run: >- | |
psql --host localhost --username postgres --dbname postgres \ | |
-c 'CREATE EXTENSION schedoc WITH SCHEMA dba' | |
env: | |
PGPASSWORD: postgres | |
- name: start the extension | |
run: >- | |
psql --host localhost --username postgres --dbname postgres \ | |
-c 'SELECT dba.schedoc_start()' | |
- name: Checkout pgtap | |
uses: actions/checkout@v4 | |
with: | |
repository: theory/pgtap | |
path: pgtap | |
ref: v1.3.3 | |
- name: install pgtap | |
working-directory: pgtap | |
run: make && psql --host localhost --username postgres --dbname postgres --file sql/pgtap.sql | |
env: | |
PGPASSWORD: postgres | |
- name: run unit tests | |
run: pg_prove -v --host localhost --dbname postgres --username postgres test/sql/*.sql | |
env: | |
PGPASSWORD: postgres | |
- name: run integration tests | |
run: pg_prove -v --host localhost --dbname postgres --username postgres test/*.sql | |
env: | |
PGPASSWORD: postgres | |
# - name: shell tests | |
# working-directory: test/shell | |
# run: ./run.sh | |
# env: | |
# PGPASSWORD: postgres |