[tox] envlist = py314-dj{main,60,52,51}-postgres py313-dj{main,60,52,51}-postgres py312-dj{main,60,52,51,42}-postgres py311-dj{52,51,42}-postgres py310-dj{52,51,42}-postgres linting [testenv] dependency_groups = testing coverage: coverage mysql: mysql postgres: postgres xdist: xdist deps = djmain: https://github.com/django/django/archive/main.tar.gz dj60: Django>=6.0a1,<6.1 dj52: Django>=5.2a1,<6.0 dj51: Django>=5.1,<5.2 dj42: Django>=4.2,<4.3 pytestmin: pytest>=7.0,<7.1 setenv = mysql: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql postgres: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_postgres sqlite: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite sqlite_file: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite_file coverage: PYTESTDJANGO_TEST_RUNNER=coverage run -m pytest coverage: COVERAGE_PROCESS_START={toxinidir}/pyproject.toml coverage: COVERAGE_FILE={toxinidir}/.coverage coverage: PYTESTDJANGO_COVERAGE_SRC={toxinidir}/ passenv = PYTEST_ADDOPTS,TERM,TEST_DB_USER,TEST_DB_PASSWORD,TEST_DB_HOST usedevelop = True commands = coverage: coverage erase {env:PYTESTDJANGO_TEST_RUNNER:pytest} {posargs:tests} coverage: coverage combine coverage: coverage report coverage: coverage xml [testenv:linting] dependency_groups = linting commands = ruff check {posargs:pytest_django pytest_django_test tests} ruff format --quiet --diff {posargs:pytest_django pytest_django_test tests} mypy {posargs:pytest_django pytest_django_test tests} ec . python -c "import subprocess, sys; sys.exit(subprocess.call('zizmor --persona=pedantic --format sarif .github/workflows/deploy.yml .github/workflows/main.yml > zizmor.sarif', shell=True))" [testenv:doc8] basepython = python3 skip_install = true dependency_groups = docs deps = doc8 commands = doc8 docs/ [testenv:docs] dependency_groups = docs commands = sphinx-build -n -W -b html -d docs/_build/doctrees docs docs/_build/html