Fix npm tests on local env and CI
This patch adds upper-contraints support both for Python and JavaScript tests. Change-Id: Ied15af4c3c16043f8fb657b11cfce6fc44ff006f
This commit is contained in:
parent
3e541aeced
commit
fad0c1f101
@ -17,7 +17,7 @@
|
|||||||
"karma-spec-reporter": "0.0.32"
|
"karma-spec-reporter": "0.0.32"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "if [ ! -d .venv ]; then tox -e npm --notest; fi",
|
"postinstall": "if [ ! -d .tox/npm ]; then tox -e npm --notest; fi",
|
||||||
"lint": "eslint --no-color vitrage_dashboard/static",
|
"lint": "eslint --no-color vitrage_dashboard/static",
|
||||||
"lintq": "eslint --quiet vitrage_dashboard/static",
|
"lintq": "eslint --quiet vitrage_dashboard/static",
|
||||||
"test": "karma start karma.conf.js --single-run"
|
"test": "karma start karma.conf.js --single-run"
|
||||||
|
@ -7,6 +7,7 @@ hacking>=1.1.0,<1.2.0 # Apache-2.0
|
|||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
python-subunit>=0.0.18
|
python-subunit>=0.0.18
|
||||||
sphinx>=1.6.2 # BSD
|
sphinx>=1.6.2 # BSD
|
||||||
|
nodeenv>=0.9.4 # BSD
|
||||||
openstackdocstheme>=1.24.0 # Apache-2.0
|
openstackdocstheme>=1.24.0 # Apache-2.0
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
testrepository>=0.0.18
|
testrepository>=0.0.18
|
||||||
|
10
tox.ini
10
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.3.2
|
||||||
envlist = py35,py27,pep8,npm
|
envlist = py35,py27,pep8,npm
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
@ -8,7 +8,10 @@ usedevelop = True
|
|||||||
install_command = pip install -U {opts} {packages}
|
install_command = pip install -U {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps =
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
commands = /bin/rm -f .testrepository/times.dbm
|
commands = /bin/rm -f .testrepository/times.dbm
|
||||||
python setup.py test --slowest --testr-args='{posargs}'
|
python setup.py test --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
@ -30,7 +33,8 @@ commands =
|
|||||||
nodeenv -p
|
nodeenv -p
|
||||||
npm install
|
npm install
|
||||||
npm run {posargs:test}
|
npm run {posargs:test}
|
||||||
deps =
|
deps =
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
Loading…
Reference in New Issue
Block a user