75 lines
1.8 KiB
INI
75 lines
1.8 KiB
INI
[tox]
|
|
envlist = pep8,pip-check-reqs,cover,py35
|
|
minversion = 1.9
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
basepython =
|
|
run,pep8,cover,mypy,pip-check-reqs,py35: python3.5
|
|
docs,venv: python2
|
|
commands =
|
|
python setup.py testr --testr-args='{posargs}'
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:run]
|
|
usedevelop=True
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
commands =
|
|
ospurge {posargs:--help}
|
|
|
|
[testenv:pep8]
|
|
skip_install = True
|
|
whitelist_externals = bash
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
flake8 {posargs}
|
|
bash -c "find {toxinidir}/tools -type f -name *.sh \
|
|
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
coverage erase
|
|
python setup.py testr --coverage --omit="ospurge/tests/*" --testr-args='{posargs}'
|
|
coverage report --omit="ospurge/tests/*" --show-missing --fail-under 100
|
|
|
|
[testenv:mypy]
|
|
skip_install = True
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
mypy-lang;python_version>'3.2'
|
|
commands =
|
|
mypy --check-untyped-defs --disallow-untyped-defs --silent-imports ospurge
|
|
|
|
[testenv:pip-check-reqs]
|
|
# Do not install test-requirements as that will pollute the virtualenv for
|
|
# determining missing packages.
|
|
# This also means that pip-check-reqs must be installed separately, outside
|
|
# of the requirements.txt files
|
|
deps = -r{toxinidir}/requirements.txt
|
|
pip_check_reqs
|
|
commands=
|
|
pip-extra-reqs -d ospurge
|
|
pip-missing-reqs -d ospurge
|
|
|
|
[testenv:docs]
|
|
whitelist_externals = echo
|
|
skip_install = True
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
doc8 -e .rst doc/source README.rst
|
|
python setup.py build_sphinx -E
|
|
echo "Documentation location: {toxinidir}/doc/build/html/index.html"
|
|
|
|
[flake8]
|
|
ignore = H404,H405
|
|
enable-extensions = H106,H203,H904
|
|
show-source = True
|