Improve CircleCI test results

This commit is contained in:
John Kleinschmidt
2017-10-04 10:01:09 -04:00
parent 1d0dfd590b
commit 4d3d7aa5fd
3 changed files with 17 additions and 3 deletions

View File

@@ -170,9 +170,13 @@ jobs:
fi
- run:
name: Test
environment:
MOCHA_FILE: junit/test-results.xml
MOCHA_REPORTER: mocha-junit-reporter
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
echo 'Testing Electron debug build'
mkdir junit
script/test.py --ci --rebuild_native_modules
else
echo 'Skipping testing on release build'
@@ -186,6 +190,10 @@ jobs:
else
echo 'Skipping verify ffmpeg on release build'
fi
- store_test_results:
path: junit
- store_artifacts:
path: junit
workflows:
version: 2

View File

@@ -9,6 +9,7 @@
"graceful-fs": "^4.1.9",
"mkdirp": "^0.5.1",
"mocha": "^3.1.0",
"mocha-junit-reporter": "^1.14.0",
"multiparty": "^4.1.3",
"q": "^1.4.1",
"send": "^0.14.1",

View File

@@ -51,10 +51,15 @@
var Coverage = require('electabul').Coverage;
var Mocha = require('mocha');
var mochaOpts = {};
if (process.env.MOCHA_REPORTER) {
mochaOpts.reporter = process.env.MOCHA_REPORTER;
}
var mocha = new Mocha(mochaOpts);
var mocha = new Mocha();
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
if (!process.env.MOCHA_REPORTER) {
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
}
mocha.timeout(isCi ? 30000 : 10000)
var query = Mocha.utils.parseQuery(window.location.search || '');