99 lines
2.6 KiB
INI
99 lines
2.6 KiB
INI
[tox]
|
|
envlist = pep8,py27dj18,releasenotes,docs,npm
|
|
minversion = 2.3.2
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
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 =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
py27: {[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}
|
|
|
|
[unit_tests]
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
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]
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
coverage erase
|
|
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:npm]
|
|
;passenv =
|
|
; HOME
|
|
; DISPLAY
|
|
;commands =
|
|
; nodeenv -p
|
|
; npm install
|
|
; npm run {posargs:test}
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
doc8 doc/source
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:releasenotes]
|
|
commands =
|
|
doc8 releasenotes/source releasenotes/notes
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[flake8]
|
|
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
|
|
max-complexity = 20
|
|
import-order-style = pep8
|
|
|
|
[doc8]
|
|
# File extensions to check
|
|
extensions = .rst, .yaml
|
|
# Maximal line length should be 80 but we have some overlong lines.
|
|
# Let's not get far more in.
|
|
max-line-length = 80
|
|
# Disable some doc8 checks:
|
|
# D000: Check RST validity
|
|
# - cannot handle "none" for code-block directive
|
|
ignore = D000
|