Try to output JS test results in jUnit format for CircleCI
This commit is contained in:
15
RoboFile.php
15
RoboFile.php
@ -119,14 +119,23 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function testJavascript() {
|
function testJavascript($xml_output_file = null) {
|
||||||
$this->compileJs();
|
$this->compileJs();
|
||||||
|
|
||||||
$this->_exec(join(' ', array(
|
$command = join(' ', array(
|
||||||
'./node_modules/.bin/mocha',
|
'./node_modules/.bin/mocha',
|
||||||
'-r tests/javascript/mochaTestHelper.js',
|
'-r tests/javascript/mochaTestHelper.js',
|
||||||
'tests/javascript/testBundles/**/*.js'
|
'tests/javascript/testBundles/**/*.js'
|
||||||
)));
|
));
|
||||||
|
|
||||||
|
if(!empty($xml_output_file)) {
|
||||||
|
$command .= sprintf(
|
||||||
|
' --reporter xunit --reporter-options output="%s"',
|
||||||
|
$xml_output_file
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_exec($command);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDebug() {
|
function testDebug() {
|
||||||
|
15
circle.yml
15
circle.yml
@ -1,15 +1,3 @@
|
|||||||
## Customize the test machine
|
|
||||||
machine:
|
|
||||||
timezone:
|
|
||||||
America/New_York # Set the timezone
|
|
||||||
|
|
||||||
php:
|
|
||||||
version:
|
|
||||||
5.6.5
|
|
||||||
|
|
||||||
services:
|
|
||||||
- mysql
|
|
||||||
|
|
||||||
## Customize dependencies
|
## Customize dependencies
|
||||||
dependencies:
|
dependencies:
|
||||||
pre:
|
pre:
|
||||||
@ -19,4 +7,5 @@ dependencies:
|
|||||||
## tests override
|
## tests override
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
- ./do t:j
|
- mkdir $CIRCLE_TEST_REPORTS/mocha
|
||||||
|
- ./do t:j $CIRCLE_TEST_REPORTS/mocha/junit.xml
|
||||||
|
Reference in New Issue
Block a user