tripleo-validations/tox.ini

61 lines
1.4 KiB
INI

[tox]
minversion = 2.0
envlist = py35,py36,py27,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages} "ansible>=2" "pre-commit>=1.10"
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
whitelist_externals = bash
[testenv:releasenotes]
basepython = python3
whitelist_externals = bash
commands = bash -c tools/releasenotes_tox.sh
[testenv:pep8]
basepython = python3
commands =
{[testenv:ansible-lint]commands}
flake8 {posargs}
python ./tools/validate-files.py .
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:ansible-lint]
basepython = python3
commands =
python -m pre_commit run ansible-lint -a
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt