From 0e0b6c4f161387af2f7a206554022c7484a682e1 Mon Sep 17 00:00:00 2001 From: Hugo Rodger-Brown Date: Mon, 18 Sep 2023 11:30:50 +0100 Subject: [PATCH] Add PG to GH actions --- .github/workflows/tox.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index f317fb9..cbe88b4 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -35,12 +35,27 @@ jobs: test: name: Run tests runs-on: ubuntu-latest + + # run postgres tests on GH + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + strategy: matrix: python: ["3.10", "3.11"] django: ["32", "40", "41", "42", "main"] env: + DJANGO_SETTINGS_MODULE: tests.settings_postgres TOXENV: py${{ matrix.python }}-django${{ matrix.django }} steps: