diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db06ec9..819e49a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,8 +40,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install --upgrade "tox<4" "tox-gh-actions<3" - python -m pip install --editable ".[test]" + python -m pip install --upgrade tox tox-gh-actions + python -m pip install --editable ".[testing]" - name: Tox tests run: | diff --git a/tox.ini b/tox.ini index 79eb878..dec50c0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,34 +1,23 @@ [tox] -skipsdist = true -skip_missing_interpreters = true -isolated_build = true -usedevelop = true -minversion = 1.8 -envlist = +requires = + tox>=4.2 +env_list = py311-checkqa docs - py{39}-dj{32,41,42} - py{310,py310}-dj{32,41,42,50,main} - py{311}-dj{41,42,50,51,main} - py{312}-dj{50,51,main} - py{313}-dj{50,51,main} - -[gh-actions] -python = - 3.9: py39 - 3.10: py310 - 3.11: py311,flake8,readme - 3.12: py312 - 3.13: py313 - pypy-3.10: pypy310 + py{39}-dj{42, 41, 32} + py{py310, 310}-dj{50, 42, 41, 32, main} + py{311}-dj{51, 50, 42, 41, main} + py{312}-dj{51, 50, main} + py{313}-dj{51, 50, main} +no_package = true +skip_missing_interpreters = true +usedevelop = true [testenv] -usedevelop = true -setenv = - DJANGO_SETTINGS_MODULE = tests.settings.main - DJANGO_CONFIGURATION = Test - COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml +package = editable deps = + coverage + coverage_enable_subprocess dj32: django~=3.2.9 dj41: django~=4.1.3 dj42: django~=4.2.0 @@ -39,9 +28,12 @@ deps = py312: wheel py313: setuptools py313: wheel - coverage - coverage_enable_subprocess -extras = testing +extras = + testing +set_env = + COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml + DJANGO_CONFIGURATION = Test + DJANGO_SETTINGS_MODULE = tests.settings.main commands = python --version {envbindir}/coverage run {envbindir}/django-cadmin test -v2 {posargs:tests} @@ -50,29 +42,38 @@ commands = coverage xml [testenv:py311-checkqa] +deps = + build + check-manifest + flake8 + twine commands = flake8 {toxinidir} check-manifest --verbose python -m build twine check dist/* -deps = - build - flake8 - twine - check-manifest [testenv:docs] -setenv = deps = -r docs/requirements.txt +set_env = commands = sphinx-build \ - --builder html \ - --write-all \ - --fail-on-warning \ - --nitpicky \ - docs \ - docs/_build/html + --builder html \ + --write-all \ + --fail-on-warning \ + --nitpicky \ + docs \ + docs/_build/html + +[gh-actions] +python = + 3.9: py39 + 3.10: py310 + 3.11: py311,flake8,readme + 3.12: py312 + 3.13: py313 + pypy-3.10: pypy310 [flake8] exclude = .tox,docs/*,.eggs