From b1f2f4f801a98f14082b502e95f288b3aa7e95db Mon Sep 17 00:00:00 2001 From: Jan Funke Date: Thu, 16 Nov 2023 20:34:08 -0500 Subject: [PATCH] Add postgres server to github action --- .github/workflows/tests.yaml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 65b0959..984cc6c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -6,11 +6,27 @@ on: jobs: test: runs-on: ubuntu-latest + + services: + postgres: + image: postgres + env: + POSTGRES_HOST_AUTH_METHOD: trust + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + strategy: fail-fast: false matrix: python-version: ["3.9", "3.10"] - mongodb-version: ["5.0", "6.0"] + + env: + PGUSER: postgres steps: - uses: actions/checkout@v2 @@ -20,11 +36,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Start MongoDB - uses: supercharge/mongodb-github-action@1.8.0 - with: - mongodb-version: ${{ matrix.mongodb-version }} - - name: Install dependencies run: pip install ".[dev]"