django-analytical/tox.ini
Jannis Leidel 5b56dceb9b
Update CI setup.
- remove support for Django 2.2
- remove support for Django 4.0
- add support for Django 4.2
- add support for Python 3.11 on supported Django versions
2023-05-02 10:42:03 +02:00

79 lines
1.6 KiB
INI

[tox]
envlist =
isort
flake8
bandit
# Python/Django combinations that are officially supported
py{36,37,38,39,310}-django32
py{38,39,310,311}-django{41,42}
readme
docs
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[gh-actions:env]
DJANGO =
3.2: django32
4.1: django41
4.2: django42
[testenv]
description = Unit tests
deps =
coverage[toml]
pytest-django
django32: Django>=3.2,<4.0
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
commands =
coverage run -m pytest {posargs}
coverage xml
[testenv:bandit]
description = PyCQA security linter
deps = bandit
commands = -bandit {posargs:-r analytical} -v
[testenv:docs]
description = Build the HTML documentation
deps = sphinx
commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
[testenv:flake8]
description = Static code analysis and code style
deps = flake8
commands = flake8 {posargs}
[testenv:isort]
description = Ensure imports are ordered consistently
deps = isort[colors]
commands = isort --check-only --diff {posargs:analytical setup.py tests}
[testenv:readme]
description = Ensure README renders on PyPI
deps =
build
twine
commands =
python -m build
twine check dist/*
[testenv:clean]
description = Clean up bytecode and build artifacts
deps = pyclean
commands =
pyclean {posargs:.}
rm -rf .tox/ build/ dist/ django_analytical.egg-info/ .coverage coverage.xml tests/coverage-report.xml tests/unittests-report.xml
allowlist_externals =
rm
[flake8]
exclude = .cache,.git,.tox,build,dist
max-line-length = 100