From fff5046a057d3cb75bc055d71acd8c018a4574b2 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 23 Jan 2024 01:17:58 +0100 Subject: [PATCH] chore(internal): adjust ecosystem-tests logging in CI (#646) --- ecosystem-tests/cli.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ecosystem-tests/cli.ts b/ecosystem-tests/cli.ts index 00ea96bfd..dbe51ff1e 100644 --- a/ecosystem-tests/cli.ts +++ b/ecosystem-tests/cli.ts @@ -6,6 +6,7 @@ import path from 'path'; const TAR_NAME = 'openai.tgz'; const PACK_FILE = `.pack/${TAR_NAME}`; +const IS_CI = Boolean(process.env['CI'] && process.env['CI'] !== 'false'); async function defaultNodeRunner() { await installPackage(); @@ -249,10 +250,11 @@ async function main() { runningProjects.delete(project); } - for (const { dest, data } of chunks) { - if (dest === 'stdout') process.stdout.write(data); - else process.stderr.write(data); + if (IS_CI) console.log(`::group::${failed.includes(project) ? '❌' : '✅'} ${project}`); + for (const { data } of chunks) { + process.stdout.write(data); } + if (IS_CI) console.log('::endgroup::'); } }), ); @@ -271,7 +273,7 @@ async function main() { try { await withRetry(fn, project, state.retry); console.error('\n'); - console.error(banner(`✅ ${project}`)); + console.error(`✅ ${project}`); } catch (err) { if (err && (err as any).shortMessage) { console.error((err as any).shortMessage); @@ -279,7 +281,7 @@ async function main() { console.error(err); } console.error('\n'); - console.error(banner(`❌ ${project}`)); + console.error(`❌ ${project}`); failed.push(project); } console.error('\n');