Skip to content

Commit 6be46cc

Browse files
authored
Merge pull request #1612 from hoeck/fix-skip-errors-during-benchmark
fix: skip failing benchmarks
2 parents f62adec + 2b406b9 commit 6be46cc

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

index.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,24 @@ async function main() {
6161

6262
console.log('Executing "%s"', c);
6363

64-
childProcess.execFileSync(cmd[0], cmd.slice(1), {
65-
shell: false,
66-
stdio: 'inherit',
67-
});
64+
try {
65+
childProcess.execFileSync(cmd[0], cmd.slice(1), {
66+
shell: false,
67+
stdio: 'inherit',
68+
});
69+
} catch (e) {
70+
// See #1611.
71+
// Due to the wide range of modules and node versions that we
72+
// benchmark these days, not every library supports every node
73+
// version.
74+
// So we ignore any benchmark that fails in order to not fail the
75+
// whole run benchmark gh action. Their results will not be
76+
// visible for this node version in the frontend.
77+
// The better solution would be benchmark case metadata that lists
78+
// compatible / node versions (e.g. for stnl sth like >= 23) and
79+
// then skip incompatible node versions explicitly.
80+
console.error('Skipped "%s" benchmark due to an error', c);
81+
}
6882
}
6983
}
7084
break;

0 commit comments

Comments
 (0)