fix tox.ini
This commit is contained in:
parent
e63ec107c5
commit
6ea30d1100
137
tox.ini
137
tox.ini
@ -1,129 +1,75 @@
|
||||
[tox]
|
||||
envlist = pep8,py27dj{18,19,110},py35,releasenotes,npm
|
||||
envlist = pep8,py27dj18,releasenotes,docs,npm
|
||||
minversion = 2.3.2
|
||||
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
|
||||
install_command = {toxinidir}/tools/pip_install.sh \
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \
|
||||
{opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
INTEGRATION_TESTS=0
|
||||
NOSE_WITH_OPENSTACK=1
|
||||
NOSE_OPENSTACK_COLOR=1
|
||||
NOSE_OPENSTACK_RED=0.05
|
||||
NOSE_OPENSTACK_YELLOW=0.025
|
||||
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
||||
whitelist_externals =
|
||||
bash
|
||||
find
|
||||
deps = .[test]
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-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}
|
||||
runserver: {envpython} {toxinidir}/manage.py runserver {posargs}
|
||||
venv: {posargs}
|
||||
|
||||
[testenv:py35]
|
||||
setenv =
|
||||
PYTHONUNBUFFERED = 1
|
||||
{[testenv]setenv}
|
||||
commands = {[unit_tests]commands}
|
||||
|
||||
[testenv:py27dj18]
|
||||
commands =
|
||||
pip install -U django>=1.8,<1.9
|
||||
{[unit_tests]commands}
|
||||
|
||||
[testenv:py27dj19]
|
||||
commands =
|
||||
pip install -U django>=1.9,<1.10
|
||||
{[unit_tests]commands}
|
||||
|
||||
[testenv:py27dj110]
|
||||
commands =
|
||||
pip install -U django>=1.10,<1.11
|
||||
{[unit_tests]commands}
|
||||
|
||||
[testenv:py27dj111]
|
||||
commands =
|
||||
pip install -U django>=1.11,<2.0
|
||||
{[unit_tests]commands}
|
||||
;[testenv:py27dj19]
|
||||
;commands =
|
||||
; pip install -U django>=1.9,<1.10
|
||||
; {[unit_tests]commands}
|
||||
;
|
||||
;[testenv:py27dj110]
|
||||
;commands =
|
||||
; pip install -U django>=1.10,<1.11
|
||||
; {[unit_tests]commands}
|
||||
;
|
||||
;[testenv:py27dj111]
|
||||
;commands =
|
||||
; pip install -U django>=1.11,<2.0
|
||||
; {[unit_tests]commands}
|
||||
|
||||
[unit_tests]
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash {toxinidir}/tools/unit_tests.sh {envpython} {toxinidir} {posargs}
|
||||
python manage.py test {posargs} heat_dashboard.test.tests --settings=heat_dashboard.test.settings
|
||||
; 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
|
||||
commands = flake8 {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands =
|
||||
coverage erase
|
||||
coverage run {toxinidir}/manage.py test horizon --settings=horizon.test.settings {posargs}
|
||||
coverage run -a {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}
|
||||
coverage run --source=heat_dashboard {toxinidir}/manage.py test heat_dashboard.test.tests --settings=heat_dashboard.test.settings {posargs}
|
||||
; coverage run -a {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}
|
||||
coverage xml
|
||||
coverage html
|
||||
|
||||
[testenv:selenium]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
WITH_SELENIUM=1
|
||||
SKIP_UNITTESTS=1
|
||||
commands = {[unit_tests]commands}
|
||||
|
||||
[testenv:selenium-headless]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
SELENIUM_HEADLESS=1
|
||||
WITH_SELENIUM=1
|
||||
SKIP_UNITTESTS=1
|
||||
commands = {[unit_tests]commands}
|
||||
|
||||
[testenv:selenium-phantomjs]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
SELENIUM_PHANTOMJS=1
|
||||
WITH_SELENIUM=1
|
||||
SKIP_UNITTESTS=1
|
||||
commands = {[unit_tests]commands}
|
||||
|
||||
[testenv:py27integration]
|
||||
# Run integration tests only
|
||||
passenv = AVCONV_INSTALLED
|
||||
setenv =
|
||||
PYTHONHASHSEED=0
|
||||
INTEGRATION_TESTS=1
|
||||
SELENIUM_HEADLESS=1
|
||||
NOSE_WITH_OPENSTACK=1
|
||||
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
||||
basepython = python2.7
|
||||
commands = nosetests openstack_dashboard.test.integration_tests {posargs}
|
||||
|
||||
[testenv:npm]
|
||||
passenv =
|
||||
HOME
|
||||
DISPLAY
|
||||
commands =
|
||||
nodeenv -p
|
||||
npm install
|
||||
npm run {posargs:test}
|
||||
|
||||
[testenv:tests_system_packages]
|
||||
# Provide an environment for system packagers that dont want anything from pip
|
||||
# Any extra deps needed for this env can be passed by setting TOX_EXTRA_DEPS
|
||||
sitepackages = True
|
||||
passenv = TOX_EXTRA_DEPS http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
# Sets deps to an empty list so nothing is installed from pip
|
||||
deps =
|
||||
commands =
|
||||
pip install -U {env:TOX_EXTRA_DEPS:}
|
||||
{[unit_tests]commands}
|
||||
;[testenv:npm]
|
||||
;passenv =
|
||||
; HOME
|
||||
; DISPLAY
|
||||
;commands =
|
||||
; nodeenv -p
|
||||
; npm install
|
||||
; npm run {posargs:test}
|
||||
|
||||
[testenv:docs]
|
||||
commands =
|
||||
@ -137,19 +83,8 @@ commands =
|
||||
|
||||
[flake8]
|
||||
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
|
||||
ignore =
|
||||
# Enable the following hacking rules which are disabled by default
|
||||
# H203 Use assertIs(Not)None to check for None
|
||||
# H904 Delay string interpolations at logging calls
|
||||
enable-extensions=H203,H904
|
||||
max-complexity = 20
|
||||
|
||||
# flake8-import-order configurations
|
||||
import-order-style = pep8
|
||||
application-import-names = horizon,openstack_dashboard
|
||||
|
||||
[hacking]
|
||||
local-check-factory = horizon.hacking.checks.factory
|
||||
|
||||
[doc8]
|
||||
# File extensions to check
|
||||
|
Loading…
Reference in New Issue
Block a user