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
|
coverage report
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
oslo_debug_helper -t ./monasca_api/tests {posargs}
|
oslo_debug_helper -t ./monasca_api/tests {posargs}
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
|
basepython = python3
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
commands =
|
commands =
|
||||||
flake8 monasca_api
|
flake8 monasca_api
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
|
basepython = python3
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
commands =
|
commands =
|
||||||
@ -49,11 +52,13 @@ commands =
|
|||||||
bandit -r monasca_api -n5 -s B101 -x monasca_api/tests
|
bandit -r monasca_api -n5 -s B101 -x monasca_api/tests
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
|
basepython = python3
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
commands = bash {toxinidir}/tools/bashate.sh
|
commands = bash {toxinidir}/tools/bashate.sh
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
{[testenv:flake8]commands}
|
{[testenv:flake8]commands}
|
||||||
{[testenv:bandit]commands}
|
{[testenv:bandit]commands}
|
||||||
@ -61,6 +66,7 @@ commands =
|
|||||||
{[testenv:checkniceness]commands}
|
{[testenv:checkniceness]commands}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
|
basepython = python3
|
||||||
description = Builds api-ref, api-guide, releasenotes and devdocs
|
description = Builds api-ref, api-guide, releasenotes and devdocs
|
||||||
commands =
|
commands =
|
||||||
{[testenv:devdocs]commands}
|
{[testenv:devdocs]commands}
|
||||||
@ -68,6 +74,7 @@ commands =
|
|||||||
{[testenv:releasenotes]commands}
|
{[testenv:releasenotes]commands}
|
||||||
|
|
||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
|
basepython = python3
|
||||||
description = Called from CI scripts to test and publish the API Ref
|
description = Called from CI scripts to test and publish the API Ref
|
||||||
commands =
|
commands =
|
||||||
rm -rf api-ref/build
|
rm -rf api-ref/build
|
||||||
@ -76,6 +83,7 @@ commands =
|
|||||||
api-ref/source api-ref/build/html
|
api-ref/source api-ref/build/html
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
|
basepython = python3
|
||||||
description = Called from CI script to test and publish the Release Notes
|
description = Called from CI script to test and publish the Release Notes
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
@ -83,6 +91,7 @@ commands =
|
|||||||
releasenotes/source releasenotes/build/html
|
releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:devdocs]
|
[testenv:devdocs]
|
||||||
|
basepython = python3
|
||||||
description = Builds developer documentation
|
description = Builds developer documentation
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build doc/source/contributor/api
|
rm -rf doc/build doc/source/contributor/api
|
||||||
@ -90,6 +99,7 @@ commands =
|
|||||||
python setup.py build_sphinx
|
python setup.py build_sphinx
|
||||||
|
|
||||||
[testenv:checkniceness]
|
[testenv:checkniceness]
|
||||||
|
basepython = python3
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
description = Validates (pep-like) documenation
|
description = Validates (pep-like) documenation
|
||||||
@ -101,6 +111,7 @@ commands =
|
|||||||
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
|
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
|
||||||
|
|
||||||
[testenv:checkjson]
|
[testenv:checkjson]
|
||||||
|
basepython = python3
|
||||||
description = Validates all json samples inside doc folder
|
description = Validates all json samples inside doc folder
|
||||||
deps =
|
deps =
|
||||||
skip_install = True
|
skip_install = True
|
||||||
@ -114,13 +125,16 @@ commands =
|
|||||||
xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
|
basepython = python3
|
||||||
description = Generates sample configuration file for monasca-api
|
description = Generates sample configuration file for monasca-api
|
||||||
commands = oslo-config-generator --config-file=config-generator/api-config.conf
|
commands = oslo-config-generator --config-file=config-generator/api-config.conf
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:bindep]
|
[testenv:bindep]
|
||||||
|
basepython = python3
|
||||||
deps = bindep
|
deps = bindep
|
||||||
commands = bindep test
|
commands = bindep test
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user