From ff31a09bbf97abe3cc5395f281b3fb0c16a13afd 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 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 65b0959..8bc3336 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -6,11 +6,22 @@ on: jobs: test: runs-on: ubuntu-latest + + services: + postgres: + image: postgres + env: + POSTGRES_HOST_AUTH_METHOD: trust + 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 +31,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]"