2016-05-20 22:37:10 +03:00
|
|
|
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
require('shelljs/global');
|
|
|
|
set('-e');
|
|
|
|
|
2016-08-01 07:04:35 +03:00
|
|
|
function isPR() {
|
|
|
|
return process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false';
|
|
|
|
}
|
|
|
|
|
2016-05-20 22:37:10 +03:00
|
|
|
if (process.env.JOB === 'e2e-guru') {
|
2016-08-01 07:04:35 +03:00
|
|
|
if (isPR()) {
|
|
|
|
console.log('Skiping E2E tests on PR');
|
|
|
|
return;
|
|
|
|
}
|
2016-05-20 22:37:10 +03:00
|
|
|
exec('npm run e2e');
|
|
|
|
} else {
|
|
|
|
exec('npm run unit');
|
2016-08-01 07:04:35 +03:00
|
|
|
if (isPR()) {
|
|
|
|
console.log('Skiping E2E tests on PR');
|
|
|
|
return;
|
|
|
|
}
|
2016-05-20 22:37:10 +03:00
|
|
|
console.log('Starting Basic E2E');
|
|
|
|
exec('npm run e2e');
|
|
|
|
}
|