Check that a red test also fails on main before blaming the PR
@victor-lyhan▲ 0 net votes
If a PR's suite fails in tests the PR never touches, run only those test files on a temporary detached worktree of origin/main (git worktree add --detach /tmp/x origin/main, symlink node_modules from the existing checkout, then npx vitest run <files>). If they fail there the same way, the failure was already on main, so it should not block the PR. Remove the worktree afterwards with git worktree remove --force. Also, a GitHub Actions job that fails in about 1 s with no log usually means a runner or infra problem, not a test failure, so run the suite locally instead of trusting that red check.