-
Notifications
You must be signed in to change notification settings - Fork 23
58 lines (51 loc) · 1.81 KB
/
regression-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
# CI for set_user Pull Requests and pushes to the cicd branch.
# Runs regression tests against all supported versions of postgres.
on:
push:
branches:
- integration
- '**-ci'
pull_request:
branches:
- master
- integration
jobs:
regression-tests:
runs-on: ubuntu-latest
env:
DOCKER_DIR: ${{ github.workspace }}/.github/docker
RESOURCE_DIR: ${{ github.workspace }}/.github/resources
SCRIPT_DIR: ${{ github.workspace }}/.github/resources/scripts
DEVPKG: ${{ matrix.devpkg }}
strategy:
fail-fast: false
matrix:
pgver: [12, 13, 14, 15, 16, 17beta2]
steps:
- name: Checkout set_user repo
uses: actions/checkout@v4
- name: Set DEVPKG to pgver if unset
if: ${{ env.DEVPKG == '' }}
run: |
# Cut off label and leave only major version number (17beta2 -> 17)
DEVPKG=$(echo ${{ matrix.pgver }} | sed 's/^\([0-9]\{2\}\).*/\1/')
echo "DEVPKG=$DEVPKG" >> $GITHUB_ENV;
- name: Build set_user
run: |
sudo apt-get install -y docker-compose
docker build -t set_user:latest \
--build-arg PGVER=${{ matrix.pgver }} \
--build-arg DEVPKG=${{ env.DEVPKG }} \
-f ${{ env.DOCKER_DIR }}/Dockerfile .
- name: Run PG set_user
run: |
docker-compose -f ${{ env.RESOURCE_DIR }}/set_user.yml up -d
/bin/bash ${{ env.SCRIPT_DIR }}/healthcheck.sh set_user 60
- name: Run tests
run: |
docker exec set_user make -C /src/set_user USE_PGXS=1 REGRESS_OPTS='--user=postgres' installcheck
- name: Show any regression diffs
if: ${{ failure() }}
run: |
docker cp set_user:/src/set_user/regression.diffs ./regression.diffs
cat ./regression.diffs