Merge "Prepare test env for Django 2.0 with python 3.5"

This commit is contained in:
Zuul 2017-12-02 04:43:53 +00:00 committed by Gerrit Code Review
commit 3850aa8294
2 changed files with 31 additions and 2 deletions

View File

@ -26,6 +26,12 @@
vars:
tox_envlist: py27dj110
- job:
name: horizon-openstack-tox-py35dj20
parent: horizon-openstack-tox-base
vars:
tox_envlist: py35dj20
- job:
name: horizon-selenium-headless
parent: horizon-openstack-tox-base
@ -60,6 +66,8 @@
- horizon-openstack-tox-py27dj110
- horizon-openstack-tox-py27dj19
- horizon-openstack-tox-py27dj18
- horizon-openstack-tox-py35dj20:
voting: false
- horizon-selenium-headless
- horizon-dsvm-tempest-plugin
gate:

25
tox.ini
View File

@ -5,6 +5,7 @@ skipsdist = True
[testenv]
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
INTEGRATION_TESTS=0
@ -18,7 +19,6 @@ deps = .[test]
-r{toxinidir}/test-requirements.txt
commands =
horizon: {envpython} {toxinidir}/manage.py test --settings=horizon.test.settings {posargs}
manage: {envpython} {toxinidir}/manage.py {posargs}
py27: {[unit_tests]commands}
py35: {[unit_tests]commands}
openstack_dashboard: {envpython} {toxinidir}/manage.py test --settings=openstack_dashboard.test.settings {posargs}
@ -51,13 +51,20 @@ commands =
pip install -U django>=1.11,<2.0
{[unit_tests]commands}
[testenv:py35dj20]
basepython = python3.5
deps =
-r{toxinidir}/test-requirements.txt
commands =
pip install -U --pre django
{[unit_tests]commands}
[unit_tests]
commands =
find . -type f -name "*.pyc" -delete
bash {toxinidir}/tools/unit_tests.sh {envpython} {toxinidir} {posargs}
[testenv:pep8]
usedevelop = True
commands =
{envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only
flake8 {posargs}
@ -136,6 +143,20 @@ commands =
doc8 releasenotes/source releasenotes/notes
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:manage]
# we don't need to install test-requirements.txt
# modules in requirements.txt are installed due to usedevelop=True
# so 'deps' can be empty.
deps =
commands = {envpython} {toxinidir}/manage.py {posargs}
[testenv:manage-py35dj20]
basepython = python3.5
deps = {[testenv:manage]deps}
commands =
pip install -U --pre django
{[testenv:manage]commands}
[flake8]
filename = *.py,django.wsgi
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules,openstack_dashboard/enabled/*