78c6668d80
* ci: make ember-ci-test (browserstack) VLTES-28 * Update .circleci/config.yml Co-Authored-By: Josh Freda <jfreda@users.noreply.github.com> * Update .circleci/config.yml Co-Authored-By: Josh Freda <jfreda@users.noreply.github.com> * ci: rename test-ember -> test-ui-browserstack * Makefile: ember-ci-test -> test-ui-browserstack - Use the same name for this test everywhere to reduce cognitive load. * browserstack: exit non-zero on failure to connect * .travis.yml: ember-ci-test -> test-ui-browserstack * browserstack: add vault bin to the path * Makefile: browserstack: fail early w/clear msgs This might save someone time later. The same checks could be applied elsewhere too trivially.
38 lines
876 B
JavaScript
38 lines
876 B
JavaScript
#!/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 {
|
|
await run('ember', ['browserstack:connect']);
|
|
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);
|
|
}
|
|
})();
|