2011-09-17 18:27:02 +00:00
|
|
|
[tox]
|
|
|
|
|
envlist =
|
2017-10-19 22:51:44 +00:00
|
|
|
# Python/Django combinations that are officially supported
|
2020-04-14 20:21:20 +00:00
|
|
|
py{27,34,35,36,37}-django111
|
|
|
|
|
py{35,36,37,38}-django22
|
|
|
|
|
py{36,37,38}-django30
|
2017-10-15 17:46:44 +00:00
|
|
|
flake8
|
2019-04-08 19:50:10 +00:00
|
|
|
bandit
|
2017-11-22 23:56:11 +00:00
|
|
|
readme
|
2019-04-08 19:50:10 +00:00
|
|
|
docs
|
|
|
|
|
clean
|
2011-09-17 18:27:02 +00:00
|
|
|
|
|
|
|
|
[testenv]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Unit tests
|
2015-04-20 21:59:19 +00:00
|
|
|
deps =
|
2017-10-15 17:46:44 +00:00
|
|
|
coverage
|
2015-05-18 09:21:33 +00:00
|
|
|
coveralls
|
2017-10-15 17:46:44 +00:00
|
|
|
django111: Django>=1.11,<2.0
|
2019-04-08 19:50:10 +00:00
|
|
|
django22: Django>=2.2,<3.0
|
2020-04-14 20:21:20 +00:00
|
|
|
django30: Django>=3.0,<3.1
|
|
|
|
|
commands =
|
|
|
|
|
coverage run setup.py test
|
|
|
|
|
sh -c 'coveralls | true'
|
2015-05-18 09:21:33 +00:00
|
|
|
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
2015-11-20 23:52:39 +00:00
|
|
|
whitelist_externals = sh
|
2017-10-15 17:46:44 +00:00
|
|
|
|
2019-04-08 19:50:10 +00:00
|
|
|
[testenv:bandit]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = PyCQA security linter
|
|
|
|
|
deps = bandit<1.6
|
2019-04-08 19:50:10 +00:00
|
|
|
commands = bandit -r --ini tox.ini
|
|
|
|
|
|
|
|
|
|
[testenv:clean]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Clean up bytecode and build artifacts
|
|
|
|
|
deps =
|
2019-04-08 19:50:10 +00:00
|
|
|
commands =
|
2019-04-09 08:44:29 +00:00
|
|
|
rm -rf .tox/ django_analytical.egg-info/ build/ dist/ docs/_build/
|
2020-04-14 20:21:20 +00:00
|
|
|
find {toxinidir} -type f -name '*.pyc' -delete
|
|
|
|
|
find {toxinidir} -type d -name '__pycache__' -delete
|
2019-04-08 19:50:10 +00:00
|
|
|
whitelist_externals =
|
2020-04-14 20:21:20 +00:00
|
|
|
find
|
2019-04-08 19:50:10 +00:00
|
|
|
rm
|
|
|
|
|
|
|
|
|
|
[testenv:docs]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Build the HTML documentation
|
2019-04-08 19:50:10 +00:00
|
|
|
deps = sphinx
|
2019-04-09 08:44:29 +00:00
|
|
|
commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
|
2019-04-08 19:50:10 +00:00
|
|
|
whitelist_externals = make
|
|
|
|
|
|
2017-10-15 17:46:44 +00:00
|
|
|
[testenv:flake8]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Static code analysis and code style
|
2017-10-15 17:46:44 +00:00
|
|
|
deps = flake8
|
|
|
|
|
commands = flake8
|
|
|
|
|
|
2017-11-22 23:56:11 +00:00
|
|
|
[testenv:readme]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Ensure README renders on PyPI
|
2019-04-08 18:14:01 +00:00
|
|
|
deps = twine
|
|
|
|
|
commands =
|
|
|
|
|
{envpython} setup.py -q sdist bdist_wheel
|
|
|
|
|
twine check dist/*
|
2017-11-22 23:56:11 +00:00
|
|
|
|
2017-10-15 17:46:44 +00:00
|
|
|
[travis:env]
|
|
|
|
|
DJANGO =
|
|
|
|
|
1.11: django111
|
2019-04-08 19:50:10 +00:00
|
|
|
2.2: django22
|
2020-04-14 20:21:20 +00:00
|
|
|
3.0: django30
|
2019-04-08 19:50:10 +00:00
|
|
|
|
|
|
|
|
[bandit]
|
|
|
|
|
exclude = .cache,.git,.tox,build,dist,docs,tests
|
|
|
|
|
targets = .
|
2017-10-15 17:46:44 +00:00
|
|
|
|
|
|
|
|
[flake8]
|
2019-04-08 18:14:01 +00:00
|
|
|
exclude = .cache,.git,.tox,build,dist
|
2017-10-15 17:46:44 +00:00
|
|
|
max-line-length = 100
|