2018-08-28 11:02:47 +00:00
|
|
|
[tox]
|
2020-07-15 15:37:03 +02:00
|
|
|
minversion = 3.2.1
|
2019-11-22 15:47:18 +01:00
|
|
|
envlist = py3,pep8,alint,cover
|
2018-08-28 11:02:47 +00:00
|
|
|
skipsdist = True
|
2020-01-09 10:30:05 +01:00
|
|
|
ignore_basepython_conflict=true
|
2018-08-28 11:02:47 +00:00
|
|
|
|
|
|
|
[testenv]
|
2019-11-22 15:47:18 +01:00
|
|
|
basepython = python3
|
2018-08-28 11:02:47 +00:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
passenv =
|
|
|
|
HOME
|
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
rm
|
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
|
|
OS_STDOUT_CAPTURE=1
|
|
|
|
OS_STDERR_CAPTURE=1
|
|
|
|
OS_TEST_TIMEOUT=60
|
|
|
|
deps =
|
2019-06-19 14:40:54 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-08-28 11:02:47 +00:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2018-09-14 13:35:27 +00:00
|
|
|
commands =
|
2018-09-19 08:40:46 +00:00
|
|
|
stestr run {posargs}
|
2018-08-28 11:02:47 +00:00
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
|
|
|
flake8 {posargs}
|
|
|
|
|
2018-09-20 17:00:30 +01:00
|
|
|
[testenv:docs]
|
|
|
|
deps =
|
2019-06-19 14:40:54 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-09-20 17:00:30 +01:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
|
2019-06-19 14:31:48 +08:00
|
|
|
[testenv:pdf-docs]
|
|
|
|
deps = {[testenv:docs]deps}
|
|
|
|
whitelist_externals = make
|
|
|
|
commands = sphinx-build -W -b latex doc/source doc/build/pdf
|
|
|
|
make -C doc/build/pdf
|
|
|
|
|
2018-11-14 17:10:38 +00:00
|
|
|
[testenv:venv]
|
|
|
|
deps =
|
2019-06-19 14:40:54 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-11-14 17:10:38 +00:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = {posargs}
|
|
|
|
|
2018-09-14 16:40:39 +00:00
|
|
|
[testenv:cover]
|
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2018-11-06 16:35:06 +00:00
|
|
|
PYTHON=coverage run --source tenks,ansible --parallel-mode
|
2018-09-14 16:40:39 +00:00
|
|
|
commands =
|
|
|
|
coverage erase
|
2018-09-19 08:40:46 +00:00
|
|
|
stestr run {posargs}
|
2018-09-14 16:40:39 +00:00
|
|
|
coverage combine
|
|
|
|
coverage report
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
|
2018-08-28 11:02:47 +00:00
|
|
|
[testenv:alint]
|
|
|
|
# ansible-lint doesn't support custom modules, so add ours to the Ansible path.
|
|
|
|
setenv = ANSIBLE_LIBRARY = {toxinidir}/ansible/action_plugins/
|
|
|
|
# Exclude roles downloaded from Galaxy (in the form 'author.role') from
|
|
|
|
# linting.
|
2020-11-23 11:27:55 +01:00
|
|
|
commands = bash -c "ansible-lint -vvv \
|
2021-03-24 10:34:36 +00:00
|
|
|
{toxinidir}/ansible/deploy.yml \
|
|
|
|
{toxinidir}/ansible/teardown.yml"
|
2018-08-28 11:02:47 +00:00
|
|
|
|
2018-11-13 13:24:56 +00:00
|
|
|
[testenv:releasenotes]
|
|
|
|
deps =
|
2019-06-19 14:40:54 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-11-13 13:24:56 +00:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
2018-08-28 11:02:47 +00:00
|
|
|
[flake8]
|
|
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
|
|
|
|
show-source = True
|
2018-11-01 11:42:40 +00:00
|
|
|
extend-ignore = E123,E125
|
2018-08-28 11:02:47 +00:00
|
|
|
builtins = _
|
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
2020-04-21 16:26:52 +02:00
|
|
|
import-order-style = pep8
|
|
|
|
application-import-names = tenks
|
|
|
|
filename = *.py
|