From eade72eb061e5d3ad3bef30a2acbd3f7c71a05b1 Mon Sep 17 00:00:00 2001 From: Fedor Borshev Date: Thu, 15 Oct 2026 15:27:11 +0300 Subject: [PATCH] Poll the CI postgres healthcheck every second The 10s health interval held the test job in "Initialize containers" for ~10s longer than postgres needs to start. -h 127.0.0.1 keeps the check from passing against the socket-only server the image runs during initdb. Measured on fandsdev/medical-backend#847: 17-19s -> 5s. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 8 ++++---- {{ cookiecutter.name }}/.github/workflows/ci.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dbca144..09a27bf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,10 +20,10 @@ jobs: POSTGRES_PASSWORD: secret image: postgres:16.2-alpine options: >- - --health-cmd pg_isready - --health-interval 10s - --health-retries 5 - --health-timeout 5s + --health-cmd "pg_isready -h 127.0.0.1" + --health-interval 1s + --health-retries 30 + --health-timeout 2s ports: - 5432:5432 diff --git a/{{ cookiecutter.name }}/.github/workflows/ci.yml b/{{ cookiecutter.name }}/.github/workflows/ci.yml index e184859c..4301fc43 100644 --- a/{{ cookiecutter.name }}/.github/workflows/ci.yml +++ b/{{ cookiecutter.name }}/.github/workflows/ci.yml @@ -60,10 +60,10 @@ jobs: env: POSTGRES_PASSWORD: secret options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 + --health-cmd "pg_isready -h 127.0.0.1" + --health-interval 1s + --health-timeout 2s + --health-retries 30 ports: - 5432:5432