next.js
7c966537 - [ci] Cache passing test results so CI retries skip them (#92832)

Commit
37 days ago
[ci] Cache passing test results so CI retries skip them (#92832) ## What Cache each passing test file's result in turbo's remote cache during CI runs. On retry attempts (`GITHUB_RUN_ATTEMPT > 1`), skip tests that already passed. ## Why When `retry_test.yml` calls `rerun-failed-jobs`, the entire test shard re-runs from scratch — 20+ minutes to retry one flaky test. With this change, only the failed tests actually re-run on retry. ## How - Cache key: `sha256(commit + test file + env fingerprint)` where env fingerprint includes `NEXT_TEST_MODE`, `IS_WEBPACK_TEST`, `IS_TURBOPACK_TEST`, etc. - Cache value: `{"passed": true, "time": N}` (~50 bytes per test) - On first attempt: all tests run normally, passes are cached - On retry: cached passes are skipped, failures re-run. Newly passing tests get cached for further retries - All caching gated on `CI` + `TURBO_TOKEN` + `GITHUB_SHA` — zero impact on local runs - Uses existing `scripts/turbo-cache.mjs` client, all cache operations are fire-and-forget with try/catch
Author
Parents
Loading