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:
n8n-cat-bot[bot]
2026-06-02 10:05:57 +00:00
committed by GitHub
parent 790a8da6af
commit 0cb26bdea9
3 changed files with 44 additions and 5 deletions
+12 -2
View File
@@ -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');
}