diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-12-14 14:23:13 +0100 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-12-14 16:48:59 +0100 |
commit | 88621e1886c3821972878cf9a9a09fe8bd8b8048 (patch) | |
tree | f4e8b1b73485738f559ff1c478b1393fd0aa3247 | |
parent | b42719f3fa7992225191a7fffcc45730f0c1644e (diff) | |
download | ironic-python-agent-88621e1886c3821972878cf9a9a09fe8bd8b8048.tar.gz |
Avoid a full install in tox environments that do not need it
Usage of usedevelop=True results in all requirements.txt dependencies
always installed (without constraints) even when requirements.txt
is not explicitly added. Override usedevelop for these environments.
Add missing constraints to the bandit environment.
Change-Id: I037dc04ffc4f426c828667df010ebe4e357e7fda
-rw-r--r-- | tox.ini | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -21,7 +21,6 @@ commands = stestr run {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:functional] -usedevelop = True # Define virtualenv directory, port to use for functional testing, and number # of seconds to wait for the agent to come alive during functional testing. setenv = @@ -33,6 +32,7 @@ setenv = commands = stestr run {posargs} [testenv:pep8] +usedevelop = False deps= hacking>=3.1.0,<4.0.0 # Apache-2.0 bashate>=0.5.1 # Apache-2.0 @@ -68,8 +68,10 @@ commands = oslo_debug_helper -t ironic_python_agent/tests/unit {posargs} [testenv:docs] setenv = PYTHONHASHSEED=0 sitepackages = False +# NOTE(dtantsur): documentation building process requires importing IPA deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html doc/source doc/build/html @@ -78,14 +80,16 @@ commands = whitelist_externals = make setenv = PYTHONHASHSEED=0 sitepackages = False -deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/doc/requirements.txt +deps = {[testenv:docs]deps} commands = sphinx-build -b latex doc/source doc/build/pdf make -C doc/build/pdf [testenv:releasenotes] +usedevelop = False +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8] @@ -128,7 +132,10 @@ deps = -r{toxinidir}/requirements.txt [testenv:bandit] -deps = -r{toxinidir}/test-requirements.txt +usedevelop = False +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt commands = bandit -r ironic_python_agent -x tests -n5 -ll -c tools/bandit.yml [testenv:examples] |