You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.3 KiB
90 lines
2.3 KiB
[tox] |
|
minversion = 3.2.0 |
|
envlist = linters,docs,py38 |
|
skipdist = True |
|
|
|
[testenv] |
|
usedevelop = True |
|
passenv = * |
|
setenv = |
|
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207 |
|
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598 |
|
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning |
|
PIP_DISABLE_PIP_VERSION_CHECK=1 |
|
commands = |
|
stestr run {posargs} |
|
stestr slowest |
|
sitepackages = True |
|
deps = |
|
-c {env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} |
|
-r {toxinidir}/requirements.txt |
|
-r {toxinidir}/test-requirements.txt |
|
whitelist_externals = bash |
|
|
|
[testenv:bindep] |
|
# Do not install any requirements. We want this to be fast and work even if |
|
# system dependencies are missing, since it's used to tell you what system |
|
# dependencies are missing! This also means that bindep must be installed |
|
# separately, outside of the requirements files. |
|
deps = bindep |
|
commands = bindep test |
|
|
|
[testenv:debug] |
|
commands = oslo_debug_helper {posargs} |
|
|
|
[testenv:pep8] |
|
envdir = {toxworkdir}/linters |
|
commands = |
|
python -m pre_commit run flake8 -a |
|
|
|
[testenv:whitespace] |
|
envdir = {toxworkdir}/linters |
|
deps = {[testenv:linters]deps} |
|
commands = |
|
python -m pre_commit run trailing-whitespace -a |
|
|
|
[testenv:shebangs] |
|
envdir = {toxworkdir}/linters |
|
deps = {[testenv:linters]deps} |
|
commands = |
|
python -m pre_commit run check-executables-have-shebangs -a |
|
|
|
[testenv:linters] |
|
deps = |
|
-r {toxinidir}/requirements.txt |
|
-r {toxinidir}/test-requirements.txt |
|
commands = |
|
{[testenv:whitespace]commands} |
|
{[testenv:shebangs]commands} |
|
|
|
[testenv:cover] |
|
deps = |
|
-r {toxinidir}/requirements.txt |
|
-r {toxinidir}/test-requirements.txt |
|
commands = python setup.py test --coverage --testr-args='{posargs}' |
|
|
|
[testenv:docs] |
|
deps = |
|
-r {toxinidir}/test-requirements.txt |
|
-r {toxinidir}/doc/requirements.txt |
|
commands= |
|
sphinx-build -W -b html doc/source doc/build/html |
|
doc8 doc |
|
|
|
[testenv:pdf-docs] |
|
whitelist_externals = make |
|
deps = {[testenv:docs]deps} |
|
commands = |
|
sphinx-build -W -b latex doc/source doc/build/pdf |
|
make -C doc/build/pdf |
|
|
|
[doc8] |
|
# Settings for doc8: |
|
extensions = .rst |
|
ignore = D001 |
|
|
|
[testenv:lower-constraints] |
|
deps = |
|
-c{toxinidir}/lower-constraints.txt |
|
-r{toxinidir}/test-requirements.txt |
|
-r{toxinidir}/requirements.txt
|
|
|