django-analytical/tox.ini

80 lines
1.6 KiB
INI
Raw Normal View History

2011-09-17 18:27:02 +00:00
[tox]
envlist =
isort
flake8
bandit
# Python/Django combinations that are officially supported
2021-10-06 05:53:01 +00:00
py{36,37,38,39}-django{22}
2021-10-06 05:52:11 +00:00
py{36,37,38,39,310}-django{32}
py{38,39,310}-django{40}
readme
docs
2011-09-17 18:27:02 +00:00
2022-03-06 17:01:13 +00:00
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
[gh-actions:env]
DJANGO =
2.2: django22
3.2: django32
4.0: django40
2011-09-17 18:27:02 +00:00
[testenv]
description = Unit tests
deps =
2022-03-06 17:01:13 +00:00
coverage[toml]
pytest-django
django22: Django>=2.2,<3.0
2021-09-27 18:36:13 +00:00
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
commands =
2022-03-06 17:01:13 +00:00
coverage run -m pytest {posargs}
2020-11-25 19:56:03 +00:00
coverage xml
[testenv:bandit]
description = PyCQA security linter
2022-03-06 17:01:13 +00:00
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}
2021-02-20 12:41:17 +00:00
[testenv:readme]
description = Ensure README renders on PyPI
2022-03-06 17:01:13 +00:00
deps =
build
twine
commands =
2022-03-06 17:01:13 +00:00
python -m build
twine check dist/*
[testenv:clean]
description = Clean up bytecode and build artifacts
deps = pyclean
commands =
2022-03-06 17:01:13 +00:00
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