Merge "Prepare to support python3.6"
This commit is contained in:
commit
c15233cdbc
@ -1,6 +1,8 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-py36:
|
||||
voting: false
|
||||
- horizon-openstack-tox-python3-django111
|
||||
- nodejs-npm-run-lint:
|
||||
vars:
|
||||
|
@ -26,7 +26,7 @@
|
||||
},
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
"postinstall": "if [ ! -d .tox ] || [ ! -d .tox/karma ]; then tox -ekarma --notest; python3.5 -m pip install -U -t ./.tox/karma/lib/python3.5/site-packages/ ../horizon; fi",
|
||||
"postinstall": "if [ ! -d .tox ] || [ ! -d .tox/karma ]; then tox -ekarma --notest; python3 -m pip install -U -t ./.tox/karma/lib/`python3 -V|tr -d ' '|tr 'P' 'p'|cut -c -9`/site-packages/ ../horizon; fi",
|
||||
"lint": "eslint --no-color {{ cookiecutter.module_name }}/static",
|
||||
"lintq": "eslint --quiet {{ cookiecutter.module_name }}/static",
|
||||
"test": "karma start {{ cookiecutter.module_name }}/karma.conf.js --single-run"
|
||||
|
@ -59,6 +59,12 @@ commands =
|
||||
{[testenv:hz-local]commands}
|
||||
{[testenv]commands}
|
||||
|
||||
[testenv:py36-local]
|
||||
basepython = python3.6
|
||||
commands =
|
||||
{[testenv:hz-local]commands}
|
||||
{[testenv]commands}
|
||||
|
||||
[testenv:py3-dj111]
|
||||
basepython = python3
|
||||
commands =
|
||||
@ -81,7 +87,7 @@ commands =
|
||||
npm run lint
|
||||
|
||||
# NOTE(shu-mutow): The "postinstall" script on package.json will install horizon
|
||||
# from master branch into py35 environment for testing javascripts.
|
||||
# from master branch into python3.x environment for testing javascripts.
|
||||
# Horizon from master is needed to be cloned into ../horizon on both local and CI.
|
||||
[testenv:karma]
|
||||
basepython = python3
|
||||
|
@ -16,10 +16,15 @@
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var child_process = require("child_process");
|
||||
|
||||
module.exports = function (config) {
|
||||
|
||||
var toxPath = '../.tox/karma/lib/python3.5/site-packages/';
|
||||
var pythonVersion = "python3.";
|
||||
var stdout = child_process.execFileSync("python3", ["--version"]);
|
||||
pythonVersion += stdout.toString().split(".")[1];
|
||||
var toxPath = '../.tox/karma/lib/' + pythonVersion + '/site-packages/';
|
||||
console.log("Karma will check on directory: ", toxPath);
|
||||
|
||||
process.env.PHANTOMJS_BIN = 'node_modules/phantomjs-prebuilt/bin/phantomjs';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user