tox: Random fixups
- Set 'ignore_basepython_conflict' so that e.g. the 'py37' environment actually uses Python 3.7 - De-duplicate some environments - Use upper-constraints for functional tests Change-Id: Ia3a43e96af0e5d42a4ad3cc9594e1cebc7e71d08 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
a9fa5131cd
commit
36295cfb4b
44
tox.ini
44
tox.ini
|
@ -1,16 +1,16 @@
|
||||||
[tox]
|
[tox]
|
||||||
minversion = 3.2.0
|
minversion = 3.2.0
|
||||||
skipsdist = True
|
|
||||||
envlist = py37,pep8,api-ref,docs,genconfig,genpolicy,releasenotes,protection
|
envlist = py37,pep8,api-ref,docs,genconfig,genpolicy,releasenotes,protection
|
||||||
|
ignore_basepython_conflict = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
basepython = python3
|
basepython = python3
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
.[ldap,memcache,mongodb]
|
.[ldap,memcache,mongodb]
|
||||||
commands =
|
commands =
|
||||||
find keystone -type f -name "*.pyc" -delete
|
find keystone -type f -name "*.pyc" -delete
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
@ -19,16 +19,10 @@ whitelist_externals =
|
||||||
find
|
find
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
|
||||||
|
|
||||||
[testenv:api-ref]
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
|
||||||
commands =
|
|
||||||
bash -c "rm -rf api-ref/build"
|
|
||||||
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps =
|
deps =
|
||||||
.[bandit]
|
.[bandit]
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
commands =
|
commands =
|
||||||
flake8 --ignore=D100,D101,D102,D103,D104,E305,E402,W503,W504,W605
|
flake8 --ignore=D100,D101,D102,D103,D104,E305,E402,W503,W504,W605
|
||||||
# Run bash8 during pep8 runs to ensure violations are caught by
|
# Run bash8 during pep8 runs to ensure violations are caught by
|
||||||
|
@ -39,6 +33,7 @@ commands =
|
||||||
|
|
||||||
[testenv:fast8]
|
[testenv:fast8]
|
||||||
envdir = {toxworkdir}/pep8
|
envdir = {toxworkdir}/pep8
|
||||||
|
deps = {[testenv:pep8]deps}
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/fast8.sh
|
{toxinidir}/tools/fast8.sh
|
||||||
passenv = FAST8_NUM_COMMITS
|
passenv = FAST8_NUM_COMMITS
|
||||||
|
@ -46,9 +41,10 @@ passenv = FAST8_NUM_COMMITS
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
# NOTE(browne): This is required for the integration test job of the bandit
|
# NOTE(browne): This is required for the integration test job of the bandit
|
||||||
# project. Please do not remove.
|
# project. Please do not remove.
|
||||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
.[bandit]
|
-r{toxinidir}/requirements.txt
|
||||||
|
.[bandit]
|
||||||
commands = bandit -r keystone -x 'keystone/tests/*'
|
commands = bandit -r keystone -x 'keystone/tests/*'
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
|
@ -87,7 +83,9 @@ passenv =
|
||||||
KSTEST_PROJECT_ID
|
KSTEST_PROJECT_ID
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps =
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
setenv = OS_TEST_PATH=./keystone/tests/functional
|
setenv = OS_TEST_PATH=./keystone/tests/functional
|
||||||
commands =
|
commands =
|
||||||
find keystone -type f -name "*.pyc" -delete
|
find keystone -type f -name "*.pyc" -delete
|
||||||
|
@ -108,7 +106,6 @@ passenv =
|
||||||
filename= *.py,keystone-manage
|
filename= *.py,keystone-manage
|
||||||
show-source = true
|
show-source = true
|
||||||
enable-extensions = H203,H904
|
enable-extensions = H203,H904
|
||||||
|
|
||||||
# D100: Missing docstring in public module
|
# D100: Missing docstring in public module
|
||||||
# D101: Missing docstring in public class
|
# D101: Missing docstring in public class
|
||||||
# D102: Missing docstring in public method
|
# D102: Missing docstring in public method
|
||||||
|
@ -120,7 +117,6 @@ enable-extensions = H203,H904
|
||||||
# W503: line break before binary operator
|
# W503: line break before binary operator
|
||||||
# W504 line break after binary operator
|
# W504 line break after binary operator
|
||||||
ignore = D100,D101,D102,D103,D104,D203,E402,W503,W504
|
ignore = D100,D101,D102,D103,D104,D203,E402,W503,W504
|
||||||
|
|
||||||
exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
|
exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
|
||||||
max-complexity=24
|
max-complexity=24
|
||||||
|
|
||||||
|
@ -154,9 +150,17 @@ commands =
|
||||||
make -C doc/build/pdf
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
envdir = {toxworkdir}/docs
|
||||||
|
deps = {[testenv:docs]deps}
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
|
[testenv:api-ref]
|
||||||
|
envdir = {toxworkdir}/docs
|
||||||
|
deps = {[testenv:docs]deps}
|
||||||
|
commands =
|
||||||
|
bash -c "rm -rf api-ref/build"
|
||||||
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue