From 3b726512534e78e7869874547645a5b8a3d53d83 Mon Sep 17 00:00:00 2001 From: Doug Fish Date: Thu, 3 Dec 2015 17:52:31 +0000 Subject: [PATCH] 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 --- tox.ini | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a2ad3a48..5cf65e0b 100644 --- a/tox.ini +++ b/tox.ini @@ -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.