From c244b4ea62a7705c02813e2436d2a2b028906e1a Mon Sep 17 00:00:00 2001 From: Martin Porwoll Date: Mon, 15 Dec 2025 12:42:25 +0000 Subject: [PATCH] fix(ci): add PostgreSQL service container for integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integration tests require a real PostgreSQL database to connect to. Added PostgreSQL 17 service container with proper health checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da5f105..caedeb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,20 @@ jobs: name: Tests runs-on: ubuntu-latest needs: [lint, typecheck] + services: + postgres: + image: postgres:17 + env: + POSTGRES_USER: payload + POSTGRES_PASSWORD: payload_test_password + POSTGRES_DB: payload_test + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - name: Checkout code uses: actions/checkout@v4 @@ -120,7 +134,7 @@ jobs: PAYLOAD_PUBLIC_SERVER_URL: https://test.example.com NEXT_PUBLIC_SERVER_URL: https://test.example.com EMAIL_DELIVERY_DISABLED: 'true' - DATABASE_URI: postgresql://placeholder:placeholder@localhost:5432/placeholder + DATABASE_URI: postgresql://payload:payload_test_password@localhost:5432/payload_test CONSENT_LOGGING_API_KEY: ci-consent-api-key-placeholder IP_ANONYMIZATION_PEPPER: ci-anonymization-pepper-placeholder