From 482a66c546b38303d324443f00bc17f9d86fc3f7 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 25 Oct 2024 17:18:42 +0200 Subject: [PATCH] CI: Run PostgreSQL as a native service (#4560) * GH Actions: Fix PostgreSQL issues * Map PostgreSQL port --- .github/workflows/tests.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 67f220431..a15eddcc5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,15 +30,21 @@ jobs: python-version: "3.9" - database: sqlite python-version: "3.10" + services: + postgres: + image: postgres:15 + env: + POSTGRES_PASSWORD: postgres + POSTGRES_DB: pretix + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 steps: - uses: actions/checkout@v4 - - uses: harmon758/postgresql-action@v1 - with: - postgresql version: '15' - postgresql db: 'pretix' - postgresql user: 'postgres' - postgresql password: 'postgres' - if: matrix.database == 'postgres' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: