Remove hard-coded Python path in karma.conf.js
This patch removes hard-coded Python path in karma.conf.js to fix the npm jobs because now these npm jobs run on debian-bullseye and py38 are not available there. It also update tox.ini for tox4 to fix the CI for the following: - Drop "skipsdist = True". When skipsdist=True is specified, a target application is not installed into a tox env, but there seems no reason to do so. In various other OpenStack projects, a target applicatin needs to be installed into a tox vnev, for example, in docs and/or linter jobs and it causes failures with tox4. So dropping it would avoid potential future failures. - Use comma to have multiple values in a single line for passenv variable in ``tox.ini`` file. Change-Id: Ifc828c7142ca3c3f7105532b80fa5e0e91d80d69 Change-Id: I88f0be008537f34dd321f3afe8531ee0c237f681
This commit is contained in:
parent
d85b611555
commit
04f6266817
|
@ -21,7 +21,16 @@ var path = require('path');
|
|||
|
||||
module.exports = function (config) {
|
||||
// This tox venv is setup in the post-install npm step
|
||||
var toxPath = '.tox/py38/lib/python3.8/site-packages/';
|
||||
var toxPath = path.resolve('./.tox/npm');
|
||||
if (!toxPath) {
|
||||
console.error('xStatic libraries not found, please run `tox -e npm`');
|
||||
process.exit(1);
|
||||
}
|
||||
toxPath += '/lib/';
|
||||
toxPath += fs.readdirSync(toxPath).find(function(directory) {
|
||||
return directory.indexOf('python') === 0;
|
||||
});
|
||||
toxPath += '/site-packages/';
|
||||
var xstaticPath = toxPath + 'xstatic/pkg/';
|
||||
|
||||
config.set({
|
||||
|
|
|
@ -10,4 +10,4 @@ then
|
|||
fi
|
||||
|
||||
echo "Creating a tox env which will contain xStatic libraries, horizon, and openstack_dashboard"
|
||||
tox -epy38 --notest
|
||||
tox -enpm --notest
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -1,7 +1,6 @@
|
|||
[tox]
|
||||
envlist = py38,pep8
|
||||
envlist = py38, pep8, npm
|
||||
minversion = 2.0
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
|
@ -9,11 +8,12 @@ basepython = python3
|
|||
usedevelop = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
DJANGO_SETTINGS_MODULE=muranodashboard.tests.settings
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
passenv = http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY, no_proxy, NO_PROXY
|
||||
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
http://tarballs.openstack.org/heat-dashboard/heat-dashboard-master.tar.gz
|
||||
allowlist_externals = {toxinidir}/manage.py
|
||||
commands =
|
||||
{toxinidir}/manage.py test muranodashboard --settings=muranodashboard.tests.settings
|
||||
|
||||
|
|
Loading…
Reference in New Issue