mirror of
https://github.com/n8n-io/n8n.git
synced 2026-08-29 01:39:24 +08:00
ci: Build tsc deps and surface vitest stderr in grind workflow (#31543)
Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+12
-2
@@ -98,12 +98,22 @@ const runnerArgs =
|
||||
: ['jest', fileRelToPkg, '--colors=false'];
|
||||
|
||||
let passed = 0;
|
||||
let firstFailureLogged = false;
|
||||
for (let i = 0; i < n; i++) {
|
||||
const res = spawnSync('pnpm', runnerArgs, {
|
||||
cwd: pkgRoot,
|
||||
stdio: values.json ? ['ignore', 'ignore', 'ignore'] : ['ignore', 'inherit', 'inherit'],
|
||||
stdio: values.json ? ['ignore', 'ignore', 'pipe'] : ['ignore', 'inherit', 'inherit'],
|
||||
encoding: 'utf8',
|
||||
});
|
||||
if (res.status === 0) passed++;
|
||||
if (res.status === 0) {
|
||||
passed++;
|
||||
} else if (values.json && !firstFailureLogged) {
|
||||
// Without this, JSON-mode invocations (used in CI) swallow every
|
||||
// vitest error message and leave authors with no diagnostic trail.
|
||||
firstFailureLogged = true;
|
||||
process.stderr.write(`\n[grind] first failing iteration for ${fileRelToPkg}:\n`);
|
||||
if (res.stderr) process.stderr.write(res.stderr);
|
||||
}
|
||||
if (!values.json) process.stdout.write(res.status === 0 ? '.' : 'F');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user