fix(tests): update database connection strings for CI
Integration Tests / integration-test (push) Failing after 57s

* Use dynamic host and port for Postgres in tests
* Add helper functions for test database host and port
This commit is contained in:
2026-09-18 21:07:28 +02:00
parent 21ce966d82
commit 63a7494982
7 changed files with 71 additions and 21 deletions
+9 -2
View File
@@ -20,7 +20,11 @@ jobs:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- 5433:5432
# No fixed host port: Docker assigns a free one, avoiding
# "port is already allocated" collisions with other jobs on a
# shared runner. The assigned port is read below via the
# `job.services.postgres.ports` context.
- 5432/tcp
options: >-
--health-cmd="pg_isready -U user"
--health-interval=5s
@@ -38,4 +42,7 @@ jobs:
cache: true
- name: Run all tests
run: make test-ci
env:
TEST_DB_HOST: 127.0.0.1
TEST_DB_PORT: ${{ job.services.postgres.ports['5432'] }}
run: make test-ci TEST_DB_HOST="$TEST_DB_HOST" TEST_DB_PORT="$TEST_DB_PORT"