39abef0055
A recent release of python-subunit 1.4.3 caused stestr to break due to an undeclared transitive dep. this is fixed in stestr 4.1.0 but it highlighted that nova-specs is not using uc when installing and as a result is prone to failures that wont happen in other tox venvs. This change simply enables the use of upper-constraints to prevent future breakages like this. Change-Id: Ic8a19b8426d3d91f82e907ace62f846a9d6c7282
71 lines
1.7 KiB
INI
71 lines
1.7 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = docs,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
#usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
allowlist_externals =
|
|
find
|
|
bash
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:fast-specs]
|
|
description = Build only specs that have changed since last commit
|
|
envdir = {toxworkdir}/docs
|
|
commands = bash tools/fast-specs.sh
|
|
|
|
[testenv:pep8]
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run --slowest {posargs}
|
|
flake8 {posargs}
|
|
|
|
[flake8]
|
|
ignore = E128,W504
|
|
exclude = .venv,.git,.tox,doc,.eggs
|
|
|
|
[testenv:move-implemented-specs]
|
|
# NOTE(mriedem): simplejson is used by launchpadlib but is a lazy import and
|
|
# fails if we don't have it.
|
|
deps = launchpadlib
|
|
simplejson
|
|
envdir={toxworkdir}/launchpadlib
|
|
commands =
|
|
python {toxinidir}/tools/move_implemented_specs.py {posargs}
|
|
|
|
[testenv:count-blueprints]
|
|
deps = {[testenv:move-implemented-specs]deps}
|
|
envdir={toxworkdir}/launchpadlib
|
|
commands =
|
|
python {toxinidir}/tools/count_blueprints.py {posargs}
|
|
|
|
[testenv:move-spec]
|
|
# Usage:
|
|
# tox -e move-spec -- [--dry-run] [--verbose] path/to/spec.rst path/to/destdir
|
|
deps=
|
|
envdir={toxworkdir}/nodeps
|
|
commands =
|
|
python {toxinidir}/tools/move_spec.py {posargs}
|
|
|
|
[testenv:abandon-spec]
|
|
# Usage:
|
|
# tox -e abandon-spec -- [--dry-run] [--verbose] path/to/obsolete-spec.rst
|
|
deps=
|
|
envdir={toxworkdir}/nodeps
|
|
commands =
|
|
python {toxinidir}/tools/abandon_spec.py {posargs}
|