From f646ded6bf445cb103792a8ffae440df260f3273 Mon Sep 17 00:00:00 2001 From: stefan6419846 <96178532+stefan6419846@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:28:25 +0100 Subject: [PATCH] test against recent Python and Django versions --- .github/workflows/ci.yml | 20 ++++++++++++++------ requirements/dev.txt | 3 ++- tox.ini | 12 ++++++++---- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7847d3..6f21f55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,21 +20,29 @@ jobs: - python: '3.10' tox_env: 'py310-dj32-drf314' - python: '3.8' - tox_env: 'py38-dj41-drf314' + tox_env: 'py38-dj42-drf314' - python: '3.9' - tox_env: 'py39-dj41-drf314' + tox_env: 'py39-dj42-drf314' - python: '3.10' - tox_env: 'py310-dj41-drf314' + tox_env: 'py310-dj42-drf314' - python: '3.11' - tox_env: 'py311-dj41-drf314' + tox_env: 'py311-dj42-drf314' + - python: '3.12' + tox_env: 'py312-dj42-drf314' + - python: '3.10' + tox_env: 'py310-dj50-drf314' + - python: '3.11' + tox_env: 'py311-dj50-drf314' + - python: '3.12' + tox_env: 'py312-dj50-drf314' runs-on: ubuntu-22.04 name: Python ${{ matrix.python }} with packages ${{ matrix.tox_env }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} diff --git a/requirements/dev.txt b/requirements/dev.txt index 7a77d89..ab0a88e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,4 +1,5 @@ -pytest==7.3.1 +pytest==7.3.1; python_version<"3.8" +pytest>=7.4.0; python_version>"3.7" # New `ast` classes: https://github.com/pytest-dev/pytest/commit/9335a0b4453dbb08a07b6ac1b33d1ed3d17c45a5 pytest-cov==4.0.0 pytest-django flake8==6.0.0 diff --git a/tox.ini b/tox.ini index bd92473..b69c4b6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,11 @@ [tox] -# See https://docs.djangoproject.com/en/4.1/faq/install/#what-python-version-can-i-use-with-django +# See https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django +# EOL: https://endoflife.date/django envlist = py{38,39}-dj22-drf{311,313} py{38,39,310}-dj32-drf{314} - py{38,39,310,311}-dj41-drf{314} + py{38,39,310,311,312}-dj42-drf{314} + py{310,311,312}-dj50-drf{314} [pytest] norecursedirs = examples @@ -22,8 +24,10 @@ deps = dj22: pytest-django~=4.5.2 dj32: Django~=3.2.0 dj32: pytest-django~=4.5.2 - dj41: Django~=4.1.7 - dj41: pytest-django~=4.5.2 + dj42: Django~=4.2.9 + dj42: pytest-django~=4.5.2 + dj50: Django~=5.0.1 + dj50: pytest-django~=4.5.2 drf311: djangorestframework~=3.11.2 drf313: djangorestframework~=3.13.1 drf314: djangorestframework~=3.14.0