manila-ui/tox.ini
OpenStack Release Bot 0c0468f02d Update TOX/UPPER_CONSTRAINTS_FILE for stable/train
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/train branch, tests will
continue to use the upper-constraints list on master.

Change-Id: If0d3d740897b1648990bfd76749b9e2b19f0219c
2019-09-16 09:22:27 +00:00

123 lines
3.3 KiB
INI

[tox]
minversion = 1.6
envlist = py27,py37,pep8,py27dj19,py27dj110,py3-dj111
skipsdist = True
[testenv]
install_command = pip install {opts} {packages}
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-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:py36]
setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings
[testenv:py37]
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+https://opendev.org/openstack/horizon}
{[testenv]commands}
RIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf
[testenv:integration]
# Run integration tests only
passenv = AVCONV_INSTALLED
setenv =
PYTHONHASHSEED=0
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf
basepython = python2.7
commands = {envpython} {toxinidir}/manage.py test manila_ui --settings=manila_ui.tests.settings --tag integration
[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:pdf-docs]
usedevelop = True
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[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.
# F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
# H405 multi line docstring summary not separated with an empty line
ignore = E123,E125,F405,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