2019-05-03 22:20:14 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
/* eslint-env node */
|
|
|
|
/* eslint-disable no-console */
|
|
|
|
|
|
|
|
const execa = require('execa');
|
|
|
|
const chalk = require('chalk');
|
|
|
|
|
|
|
|
function run(command, args = []) {
|
|
|
|
console.log(chalk.dim('$ ' + command + ' ' + args.join(' ')));
|
|
|
|
|
|
|
|
let p = execa(command, args);
|
|
|
|
p.stdout.pipe(process.stdout);
|
|
|
|
p.stderr.pipe(process.stderr);
|
|
|
|
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
|
|
|
(async function() {
|
|
|
|
try {
|
2019-05-24 12:02:51 +00:00
|
|
|
await run('ember', ['browserstack:connect']);
|
2019-05-03 22:20:14 +00:00
|
|
|
try {
|
|
|
|
await run('ember', ['test', '-f=secrets/secret/create', '-c', 'testem.browserstack.js']);
|
|
|
|
|
|
|
|
console.log('success');
|
|
|
|
process.exit(0);
|
|
|
|
} finally {
|
|
|
|
if (process.env.TRAVIS_JOB_NUMBER) {
|
|
|
|
await run('ember', ['browserstack:results']);
|
|
|
|
}
|
|
|
|
await run('ember', ['browserstack:disconnect']);
|
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
console.log('error');
|
|
|
|
console.log(error);
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
})();
|