aa21130ff9
Horizon defined a project template 'horizon-non-primary-django-jobs' for django jobs. This patch use that template to run django jobs here. For information please refer [1] [1] https://review.opendev.org/#/c/681969/ Change-Id: Iabbed6052887ba92c07cb68c2333a197f04348cc
105 lines
2.8 KiB
INI
105 lines
2.8 KiB
INI
[tox]
|
|
minversion = 2.5.0
|
|
envlist = py27,py37,py3-{dj111,dj22},pep8,eslint,karma
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
CLIENT_NAME=octavia-dashboard
|
|
DJANGO_SETTINGS_MODULE=octavia_dashboard.tests.settings
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = npm
|
|
bash
|
|
commands =
|
|
dj111: pip install django>=1.11,<2
|
|
dj22: pip install django>=2.2,<2.3
|
|
python manage.py test octavia_dashboard --settings=octavia_dashboard.tests.settings
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
# npm must be installed on the system, for example
|
|
# sudo apt-get install npm
|
|
# sudo yum install npm (on RHEL/CentOS, enable EPEL repository)
|
|
commands = npm install
|
|
npm test
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
whitelist_externals = rm
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build/html
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
basepython = python3
|
|
deps = {[testenv:docs]deps}
|
|
whitelist_externals =
|
|
make
|
|
rm
|
|
commands =
|
|
rm -rf doc/build/pdf
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
whitelist_externals = rm
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
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}
|
|
|
|
[testenv:eslint]
|
|
basepython = python3
|
|
# npm must be installed on the system, for example
|
|
# sudo apt-get install npm
|
|
commands = npm install
|
|
npm run lint
|
|
|
|
[testenv:karma]
|
|
basepython = python3
|
|
# npm must be installed on the system, for example
|
|
# sudo apt-get install npm
|
|
commands = npm install
|
|
npm test
|
|
|
|
[flake8]
|
|
# 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)
|
|
show-source = True
|
|
ignore = E123,E125,F405
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,.tmp,dist,doc,*lib/python*,*egg,build,node_modules
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|