
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: I99ebe4dc0f09994b5a85e0258ad70de4cb76bc32 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
94 lines
2.4 KiB
INI
94 lines
2.4 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py35,py27,pep8,py27dj19,py27dj110,py3-dj111
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:py27]
|
|
setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings
|
|
|
|
[testenv:py35]
|
|
setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings
|
|
|
|
[testenv:py36]
|
|
setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings
|
|
|
|
[testenv:py3-dev]
|
|
setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings
|
|
commands =
|
|
pip install {env:HORIZON_REPO:git+git://git.openstack.org/openstack/horizon}
|
|
{[testenv]commands}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
# Django-1.8 is LTS
|
|
[testenv:py27dj18]
|
|
basepython = python2.7
|
|
commands = pip install django>=1.8,<1.9
|
|
/bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:py27dj19]
|
|
basepython = python2.7
|
|
commands = pip install django>=1.9,<1.10
|
|
/bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:py27dj110]
|
|
basepython = python2.7
|
|
commands = pip install django>=1.10,<1.11
|
|
/bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:py3-dj111]
|
|
basepython = python3
|
|
commands =
|
|
pip install django>=1.11,<2
|
|
{[testenv]commands}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
commands = {toxinidir}/tools/cover.sh {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
whitelist_externals = rm
|
|
commands =
|
|
rm -rf doc/build
|
|
python setup.py build_sphinx
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees \
|
|
-b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = E123,E125,H405
|
|
enable-extensions = H203,H106
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|