From 8e79ed3979d91f844a5650a9590d63c4e21ca269 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 15 Apr 2023 13:55:41 +0100 Subject: [PATCH] Test on Django 4.2 --- .github/workflows/ci.yml | 8 +++++++- run.sh | 9 ++++++++- test_settings.py | 2 ++ tox.ini | 12 +++++++----- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4b4142..bdd68fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,20 @@ jobs: fail-fast: false matrix: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] - django: ['3.2', '4.0', '4.1', 'main'] + django: ['3.2', '4.0', '4.1', '4.2', 'main'] exclude: - python-version: '3.7' django: '4.0' - python-version: '3.7' django: '4.1' + - python-version: '3.7' + django: '4.2' - python-version: '3.7' django: 'main' + - python-version: '3.11' + django: '3.2' + - python-version: '3.11' + django: '4.0' steps: - uses: actions/checkout@v3 diff --git a/run.sh b/run.sh index 7850414..6f65009 100755 --- a/run.sh +++ b/run.sh @@ -20,7 +20,14 @@ usage() { case "$CMD" in "test" ) echo "Django version: $(python -m django --version)" - python -m django test django_ratelimit "$@" + python \ + -W error::ResourceWarning \ + -W error::DeprecationWarning \ + -W error::PendingDeprecationWarning \ + -m django \ + test \ + django_ratelimit \ + "$@" ;; "lint"|"flake8" ) echo "Flake8 version: $(flake8 --version)" diff --git a/test_settings.py b/test_settings.py index 337d6e4..0245d39 100644 --- a/test_settings.py +++ b/test_settings.py @@ -36,3 +36,5 @@ 'NAME': 'test.db', }, } + +USE_TZ = True diff --git a/tox.ini b/tox.ini index ba182c0..2e7eedb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,24 @@ [tox] envlist = py37-django32, - py38-django{32,40,41,main}, - py39-django{32,40,41,main}, - py310-django{32,40,41,main}, - py311-django{32,40,41,main}, + py38-django{32,40,41,42,main}, + py39-django{32,40,41,42,main}, + py310-django{32,40,41,42,main}, + py311-django{41,42,main}, pypy39-django{32,40,41,main}, [testenv] +allowlist_externals = ./run.sh deps = django32: Django>=3.2,<3.3 django40: Django>=4.0,<4.1 django41: Django>=4.1,<4.2 + django42: Django>=4.2,<4.3 djangomain: https://github.com/django/django/archive/main.tar.gz pymemcache>=4.0,<5.0 django-redis>=5.2,<6.0 flake8 commands = - ./run.sh test + ./run.sh test {posargs} ./run.sh flake8