Include javascript lint and unit test in tox

Add lint and unit test environments for JavaScript to tox.ini

Partially-Implements: blueprint horizon-lbaas-v2-ui
Change-Id: I13c1dd18c160c78ef303595cedc8009f58596863
This commit is contained in:
Doug Fish 2015-12-03 17:52:31 +00:00
parent f344259472
commit 3b72651253
1 changed files with 19 additions and 1 deletions

20
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
minversion = 1.6
envlist = py27,pep8
envlist = py27,pep8,eslint,karma
skipsdist = True
[testenv]
@ -8,8 +8,14 @@ usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = /usr/bin/npm
commands = python manage.py test
[testenv:pep8]
@ -27,6 +33,18 @@ commands = python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:eslint]
# npm must be installed on the system, for example
# sudo apt-get install npm
commands = npm install
npm run lint
[testenv:karma]
# 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.