Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nbhoski committed Aug 13, 2024
1 parent 3dd03a4 commit 69ceb79
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/buildSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ export function processAndDisplayBuildSummary() {
if (existsSync(filePath)) {
try {
const bs = readFileSync(filePath, { encoding: 'utf8' });
const data = JSON.parse(bs).map((t: { name: any; failed: { toString: () => any; }; description: any; duration: { toString: () => any; }; }) => [t.name, t.failed.toString(), t.description, t.duration.toString()]);
const data = JSON.parse(bs).map((t: { name: any; failed: { toString: () => any; }; skipped: { toString: () => any; }; description: any; duration: { toString: () => any; }; }) => {
if (t.failed.toString() === 'true') {
return [t.name, '🔴 Failed', t.description, t.duration.toString()];
} else if (t.skipped.toString() === 'true') {
return [t.name, '🔵 Skipped', t.description, t.duration.toString()];
} else {
return [t.name, '🟢 Success', t.description, t.duration.toString()];
}
});
taskSummaryTableRows = [header, ...data];//getBuildSummaryTable(data);
} catch (e) {
console.error('An error occurred while reading the build summary file:', e);
Expand Down

0 comments on commit 69ceb79

Please sign in to comment.