From 05d40271aed23098d24456b68068b6f8a2929d6f Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 29 Aug 2024 17:32:49 +0100 Subject: [PATCH] Test against psycopg 2 and 3 --- .github/workflows/test.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df103e220d..b4a67bbb30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,22 +13,22 @@ concurrency: cancel-in-progress: true # Our test suite should cover: -# - all supported databases against current Python and Django +# - all supported databases against current Python and Django (including psycopg v2 and v3) # - at least one test run for each older supported version of Python and Django # - at least one test run for each supported Elasticsearch version # - a test run against Django's git main and active stable branch (allowing failures) # - test runs with USE_EMAIL_USER_MODEL=yes, DISABLE_TIMEZONE=yes and WAGTAIL_CHECK_TEMPLATE_NUMBER_FORMAT=1 # Current configuration: -# - django 4.2, python 3.9, postgres:12, parallel +# - django 4.2, python 3.9, postgres:12, psycopg 2, parallel # - django 4.2, python 3.10, mysql:8.0 # - django 5.0, python 3.11, sqlite, WAGTAIL_CHECK_TEMPLATE_NUMBER_FORMAT=1 # - django 5.1, python 3.12, mysql:8.1, parallel # - django 5.1, python 3.12, sqlite, parallel, USE_EMAIL_USER_MODEL=yes -# - django 5.1, python 3.12, postgres:15, parallel, DISABLE_TIMEZONE=yes -# - django stable/5.1.x, python 3.11, postgres:15 (allow failures) -# - django main, python 3.12, postgres:latest, parallel (allow failures) -# - elasticsearch 7, django 4.2, python 3.9, postgres:latest +# - django 5.1, python 3.12, postgres:15, psycopg 3, parallel, DISABLE_TIMEZONE=yes +# - django stable/5.1.x, python 3.11, postgres:15, psycopg 3 (allow failures) +# - django main, python 3.12, postgres:latest, psycopg 3, parallel (allow failures) +# - elasticsearch 7, django 4.2, python 3.9, postgres:latest, psycopg 2 # - opensearch 2, django 5.0, python 3.10, sqlite # - elasticsearch 8, django 5.1, python 3.12, sqlite, USE_EMAIL_USER_MODEL=yes @@ -89,20 +89,24 @@ jobs: include: - python: '3.9' django: 'Django>=4.2,<4.3' + psycopg: 'psycopg2>=2.6' experimental: false parallel: '--parallel' - python: '3.12' django: 'Django>=5.0,<5.1' + psycopg: 'psycopg>=3.1.8' postgres: 'postgres:15' notz: notz experimental: false parallel: '--parallel' - python: '3.11' django: 'git+https://github.com/django/django.git@stable/5.1.x#egg=Django' + psycopg: 'psycopg>=3.1.8' postgres: 'postgres:15' experimental: true - python: '3.12' django: 'git+https://github.com/django/django.git@main#egg=Django' + psycopg: 'psycopg>=3.1.8' experimental: true postgres: 'postgres:latest' parallel: '--parallel' @@ -125,7 +129,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install "psycopg2>=2.6" + pip install "${{ matrix.psycopg }}" pip install -e '.[testing]' --config-settings editable_mode=strict pip install "${{ matrix.django }}" ${{ matrix.install_extras }}