fix tox python3 overrides
We want to default to running all tox environments under python 3, so set the basepython value in each environment. We do not want to specify a minor version number, because we do not want to have to update the file every time we upgrade python. We do not want to set the override once in testenv, because that breaks the more specific versions used in default environments like py35 and py36. Change-Id: I9e1dfd8d4ff6039cbf6d26d1c55fe8c6f7fb84e1 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
5bd1b5e212
commit
0b6c6561f5
14
tox.ini
14
tox.ini
|
@ -32,16 +32,19 @@ commands =
|
|||
coverage report
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands =
|
||||
oslo_debug_helper -t ./monasca_api/tests {posargs}
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
commands =
|
||||
flake8 monasca_api
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
commands =
|
||||
|
@ -49,11 +52,13 @@ commands =
|
|||
bandit -r monasca_api -n5 -s B101 -x monasca_api/tests
|
||||
|
||||
[testenv:bashate]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
commands = bash {toxinidir}/tools/bashate.sh
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
{[testenv:flake8]commands}
|
||||
{[testenv:bandit]commands}
|
||||
|
@ -61,6 +66,7 @@ commands =
|
|||
{[testenv:checkniceness]commands}
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
description = Builds api-ref, api-guide, releasenotes and devdocs
|
||||
commands =
|
||||
{[testenv:devdocs]commands}
|
||||
|
@ -68,6 +74,7 @@ commands =
|
|||
{[testenv:releasenotes]commands}
|
||||
|
||||
[testenv:api-ref]
|
||||
basepython = python3
|
||||
description = Called from CI scripts to test and publish the API Ref
|
||||
commands =
|
||||
rm -rf api-ref/build
|
||||
|
@ -76,6 +83,7 @@ commands =
|
|||
api-ref/source api-ref/build/html
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
description = Called from CI script to test and publish the Release Notes
|
||||
commands =
|
||||
rm -rf releasenotes/build
|
||||
|
@ -83,6 +91,7 @@ commands =
|
|||
releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:devdocs]
|
||||
basepython = python3
|
||||
description = Builds developer documentation
|
||||
commands =
|
||||
rm -rf doc/build doc/source/contributor/api
|
||||
|
@ -90,6 +99,7 @@ commands =
|
|||
python setup.py build_sphinx
|
||||
|
||||
[testenv:checkniceness]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
description = Validates (pep-like) documenation
|
||||
|
@ -101,6 +111,7 @@ commands =
|
|||
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
|
||||
|
||||
[testenv:checkjson]
|
||||
basepython = python3
|
||||
description = Validates all json samples inside doc folder
|
||||
deps =
|
||||
skip_install = True
|
||||
|
@ -114,13 +125,16 @@ commands =
|
|||
xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
||||
|
||||
[testenv:genconfig]
|
||||
basepython = python3
|
||||
description = Generates sample configuration file for monasca-api
|
||||
commands = oslo-config-generator --config-file=config-generator/api-config.conf
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:bindep]
|
||||
basepython = python3
|
||||
deps = bindep
|
||||
commands = bindep test
|
||||
|
||||
|
|
Loading…
Reference in New Issue