Skip to content

Commit 8fcf0d4

Browse files
committed
Enable GitHub actions
1 parent 42512c7 commit 8fcf0d4

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
# This should disable running the workflow on tags, according to the
6+
# on.<push|pull_request>.<branches|tags> GitHub Actions docs.
7+
branches:
8+
- "*"
9+
pull_request:
10+
11+
concurrency:
12+
# Cancel older requests of the same workflow in the same branch.
13+
group: ${{ github.workflow }}-${{ github.ref_name }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
tests:
18+
runs-on: ubuntu-latest
19+
container:
20+
image: debian:trixie # OpenSSL >= 3.2
21+
22+
defaults:
23+
run:
24+
shell: sh
25+
26+
strategy:
27+
#fail-fast: false
28+
matrix:
29+
pgversion:
30+
- 19
31+
- 18
32+
- 17
33+
- 16
34+
- 15
35+
- 14
36+
- 13
37+
38+
env:
39+
PGVERSION: ${{ matrix.pgversion }}
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v3
44+
45+
- name: Install PostgreSQL
46+
run: |
47+
apt-get update
48+
apt-get install -y build-essential libargon2-dev libscrypt-dev libssl-dev zlib1g-dev postgresql-common
49+
echo y | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
50+
apt-get upgrade -y
51+
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -v $PGVERSION -p -i
52+
pg_ctlcluster $PGVERSION main start
53+
echo "My name is $(id -un)"
54+
su -c "createuser -s $(id -un)" postgres
55+
56+
- name: Build
57+
run: |
58+
make PROFILE="-Werror -D_PWHASH_LIBSCRYPT_SUPPORT=1 -D_PWHASH_ARGON2_OSSL_SUPPORT=1 -D_PWHASH_CRYPT_SCRYPT_SUPPORT=1 -D_PWHASH_CRYPT_YESCRYPT_SUPPORT=1"
59+
make install
60+
61+
- name: Test
62+
run: |
63+
make installcheck
64+
65+
- name: Show regression diffs
66+
if: ${{ failure() }}
67+
run: |
68+
cat regression.diffs

0 commit comments

Comments
 (0)