Skip to content

Commit fff5046

Browse files
committed
chore(internal): adjust ecosystem-tests logging in CI (#646)
1 parent ca5887d commit fff5046

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ecosystem-tests/cli.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import path from 'path';
66

77
const TAR_NAME = 'openai.tgz';
88
const PACK_FILE = `.pack/${TAR_NAME}`;
9+
const IS_CI = Boolean(process.env['CI'] && process.env['CI'] !== 'false');
910

1011
async function defaultNodeRunner() {
1112
await installPackage();
@@ -249,10 +250,11 @@ async function main() {
249250
runningProjects.delete(project);
250251
}
251252

252-
for (const { dest, data } of chunks) {
253-
if (dest === 'stdout') process.stdout.write(data);
254-
else process.stderr.write(data);
253+
if (IS_CI) console.log(`::group::${failed.includes(project) ? '❌' : '✅'} ${project}`);
254+
for (const { data } of chunks) {
255+
process.stdout.write(data);
255256
}
257+
if (IS_CI) console.log('::endgroup::');
256258
}
257259
}),
258260
);
@@ -271,15 +273,15 @@ async function main() {
271273
try {
272274
await withRetry(fn, project, state.retry);
273275
console.error('\n');
274-
console.error(banner(`✅ ${project}`));
276+
console.error(`✅ ${project}`);
275277
} catch (err) {
276278
if (err && (err as any).shortMessage) {
277279
console.error((err as any).shortMessage);
278280
} else {
279281
console.error(err);
280282
}
281283
console.error('\n');
282-
console.error(banner(`❌ ${project}`));
284+
console.error(`❌ ${project}`);
283285
failed.push(project);
284286
}
285287
console.error('\n');

0 commit comments

Comments
 (0)