-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.45 KB
/
test.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
name: test
on:
push:
branches:
- "*"
jobs:
test:
name: regression test
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
pgbranch:
- master
- REL_17_STABLE
- REL_16_STABLE
- REL_15_STABLE
env:
PGBRANCH: ${{ matrix.pgbranch }}
steps:
- uses: actions/checkout@v4
- name: set_env
run: |
echo "PGHOME=${HOME}/${PGBRANCH}" >> $GITHUB_ENV
echo "PGDATA=${HOME}/pgdata" >> $GITHUB_ENV
- name: add_path
run: |
echo "${PGHOME}/bin" >> $GITHUB_PATH
- name: before_install
run: |
git clone -b ${PGBRANCH} --depth 1 https://github.com/postgres/postgres.git
cd postgres
./configure --prefix=${PGHOME} --enable-debug --enable-cassert
make -j 2 -s
make -s install
initdb -D ${PGDATA} --locale=C --encoding=UTF8
pg_ctl -D ${PGDATA} -w start
- name: before_script
run: |
cd ${GITHUB_WORKSPACE}
make USE_PGXS=1 PG_CONFIG=${PGHOME}/bin/pg_config
make USE_PGXS=1 PG_CONFIG=${PGHOME}/bin/pg_config install
- name: script
run: |
make USE_PGXS=1 PG_CONFIG=${PGHOME}/bin/pg_config installcheck
- name: after_script_failure
if: failure()
run: |
if [ -f regression.diffs ]; then cat regression.diffs; fi
exit 1
- name: after_script_success
if: success()
run: |
echo "SUCCESS"