Skip to content

Commit c245951

Browse files
committed
ci: Switch testing postgres to the system-postgress DB provider
1 parent 3af1fa9 commit c245951

File tree

2 files changed

+310
-1
lines changed

2 files changed

+310
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ jobs:
267267
- NAME: postgres
268268
CFG: compile-gcc
269269
COMPILER: gcc
270-
TEST_DB_PROVIDER: postgres
270+
TEST_DB_PROVIDER: system-postgres
271271
TEST_NETWORK: regtest
272272
# And don't forget about elements (like cdecker did when
273273
# reworking the CI...)
@@ -290,6 +290,19 @@ jobs:
290290
COMPILER: gcc
291291
TEST_NETWORK: regtest
292292
EXPERIMENTAL_SPLICING: 1
293+
services:
294+
postgres:
295+
# Docker Hub image
296+
image: postgres
297+
# Provide the password for postgres
298+
env:
299+
POSTGRES_PASSWORD: postgres
300+
# Set health checks to wait until postgres has started
301+
options: >-
302+
--health-cmd pg_isready
303+
--health-interval 10s
304+
--health-timeout 5s
305+
--health-retries 5
293306
steps:
294307
- name: Checkout
295308
uses: actions/checkout@v4
@@ -340,6 +353,8 @@ jobs:
340353
TEST_DB_PROVIDER: ${{ matrix.TEST_DB_PROVIDER }}
341354
TEST_NETWORK: ${{ matrix.TEST_NETWORK }}
342355
LIGHTNINGD_POSTGRES_NO_VACUUM: 1
356+
# Yes, that DSN is silly :-) It's only used for the TEST_DB_PROVIDER=system-postgres
357+
CLN_TEST_POSTGRES_DSN: postgres://postgres:postgres@postgress:5432/postgres
343358
run: |
344359
env
345360
cat config.vars

0 commit comments

Comments
 (0)