Add -constraints sections for base CI jobs
Using factors with sections is not a thing and likely will not be for a while, as such we are going to have to duplicate sections to be able to set the constraints based install_command. Implements Blueprint: Requirements-Management Change-Id: Ie679904330a83e4b7eb75c189b48afef127b0d22
This commit is contained in:
parent
cecf2a5883
commit
44905578fd
34
tox.ini
34
tox.ini
@ -8,7 +8,7 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
passenv = TRACE_FAILONLY
|
passenv = TRACE_FAILONLY
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command =
|
install_command =
|
||||||
constraints: pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
constraints: {[testenv:common-constraints]install_command}
|
||||||
pip install -U {opts} {packages}
|
pip install -U {opts} {packages}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
@ -31,6 +31,9 @@ setenv = {[testenv]setenv}
|
|||||||
setenv = OS_TEST_TIMEOUT=180
|
setenv = OS_TEST_TIMEOUT=180
|
||||||
commands = false
|
commands = false
|
||||||
|
|
||||||
|
[testenv:common-constraints]
|
||||||
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
|
|
||||||
[testenv:dsvm]
|
[testenv:dsvm]
|
||||||
# Fake job to define environment variables shared between dsvm jobs
|
# Fake job to define environment variables shared between dsvm jobs
|
||||||
setenv = OS_SUDO_TESTING=1
|
setenv = OS_SUDO_TESTING=1
|
||||||
@ -104,17 +107,46 @@ whitelist_externals =
|
|||||||
sh
|
sh
|
||||||
bash
|
bash
|
||||||
|
|
||||||
|
[testenv:pep8-constraints]
|
||||||
|
basepython = {[testenv:pep8]basepython}
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
commands=
|
||||||
|
# If it is easier to add a check via a shell script, consider adding it in this file
|
||||||
|
sh ./tools/misc-sanity-checks.sh
|
||||||
|
{toxinidir}/tools/check_unit_test_structure.sh
|
||||||
|
# Checks for coding and style guidelines
|
||||||
|
flake8
|
||||||
|
sh ./tools/coding-checks.sh --pylint '{posargs}'
|
||||||
|
neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
|
||||||
|
whitelist_externals = {[testenv:pep8]whitelist_externals}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:cover-constraints]
|
||||||
|
basepython = {[testenv:cover]basepython}
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
commands =
|
||||||
|
python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:venv-constraints]
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
|
[testenv:docs-constraints]
|
||||||
|
install_command = {[testenv:common-constraints]install_command}
|
||||||
|
commands = {[testenv:docs]commands}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E125 continuation line does not distinguish itself from next logical line
|
# E125 continuation line does not distinguish itself from next logical line
|
||||||
# E126 continuation line over-indented for hanging indent
|
# E126 continuation line over-indented for hanging indent
|
||||||
|
Loading…
Reference in New Issue
Block a user