From 2082a6e18cae296738ac4fe6f3ca043df64abe3a 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 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 65b0959..a198b11 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -6,11 +6,24 @@ 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"] steps: - uses: actions/checkout@v2 @@ -20,11 +33,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]"