ci: balance test shards and reuse package download caches

This commit is contained in:
morluto
2026-10-11 16:40:17 +08:00
parent e8528cedcd
commit 40b37aeee1
5 changed files with 335 additions and 0 deletions
+5
View File
@@ -4,6 +4,8 @@ import { join } from "node:path";
import { defineConfig } from "vitest/config";
import { CiTestSequencer } from "./tests/ciTestSequencer.js";
// Playwright's registry does not derive a cache directory for Termux's
// `android` platform. Match the production CLI fallback before workers import
// browser modules.
@@ -151,6 +153,9 @@ export default defineConfig({
env: { TMPDIR: CANONICAL_TEMPORARY_DIRECTORY },
maxWorkers: MAX_TEST_WORKERS,
projects,
...(process.env.REA_CI_TEST_HISTORY
? { sequence: { sequencer: CiTestSequencer } }
: {}),
retry: 0,
reporters: ["default"],
runner: "./tests/processOwnershipRunner.ts",