-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show test logs in CI #157
base: main
Are you sure you want to change the base?
show test logs in CI #157
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import debug from 'debug'; | ||
import { type Options, execa } from 'execa'; | ||
import fse from 'fs-extra'; | ||
import fs from 'node:fs/promises'; | ||
import os from 'node:os'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
const DEBUG = process.env.DEBUG === 'true'; | ||
const debugLog = debug('addon-blueprint:utils'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
|
||
// repo-root | ||
|
@@ -91,7 +93,11 @@ export async function runScript({ | |
let promise = execa(packageManager, ['run', script], { cwd }); | ||
|
||
try { | ||
await promise; | ||
const result = await promise; | ||
|
||
debugLog(`Finished running script ${script}`); | ||
debugLog(result.stdout); | ||
debugLog(result.stderr); | ||
|
||
return promise; | ||
} catch (e) { | ||
|
@@ -131,10 +137,8 @@ export async function createAddon({ | |
}) { | ||
let emberCliArgs = ['addon', name, '-b', blueprintPath, '--skip-npm', '--skip-git', ...args]; | ||
|
||
if (DEBUG) { | ||
console.debug(`Running ember-cli in ${options.cwd}`); | ||
console.debug(`\tember ${emberCliArgs.join(' ')}`); | ||
} | ||
debugLog(`Running ember-cli in ${options.cwd}`); | ||
debugLog(`\tember ${emberCliArgs.join(' ')}`); | ||
|
||
let result = await execa('ember', emberCliArgs, { | ||
...options, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temp feels like a goofy label