-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.48 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# .github/workflows/pgtest.yml
name: Postgres tests
on: push
jobs:
pgtap:
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.
- run: pg-build-test
# Basic regression test.
- name: install dependency
run: pgxn install ddl_historization
- name: build application
run: make all
- name: install extension
run: make install
- name: create extension
run: >-
psql --host localhost --username postgres --dbname postgres \
-c 'CREATE EXTENSION schedoc CASCADE'
env:
PGPASSWORD: postgres
- 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 --host localhost --dbname postgres --username postgres test/sql/*.sql
env:
PGPASSWORD: postgres
- name: run integration tests
run: pg_prove --host localhost --dbname postgres --username postgres test/*.sql
env:
PGPASSWORD: postgres