19908436b8
## Summary Speeds up webapp test jobs by balancing measured work across runners, reducing repeated container setup, and ensuring test workers release shutdown resources promptly. Unit tests run across 24 duration-aware shards, while E2E tests run across two balanced shards. ## Design `RunEngine` shutdown now closes processing resources before support resources, continues cleanup if one close fails, and reuses one shutdown promise for concurrent callers. Redis workers clear completed shutdown deadlines so finished tests no longer wait on idle timers. Container-heavy suites are split only where it improves parallelism, and repeated replication and engine fixtures are consolidated where one end-to-end case provides coverage. Timing weights are refreshed for all affected files. Dependency installation overlaps container pulls, and both workflows use WarpBuild's Node setup action.
22 lines
788 B
TypeScript
22 lines
788 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { DurationShardingSequencer } from "@internal/testcontainers/sequencer";
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
sequence: { sequencer: DurationShardingSequencer },
|
|
include: ["test/**/*.e2e.test.ts"],
|
|
globals: true,
|
|
pool: "forks",
|
|
/**
|
|
* Each e2e file boots its own Docker stack (Postgres, Redis, s2-lite,
|
|
* MinIO) plus a webapp process. Running files in parallel boots several
|
|
* stacks at once and thrashes the CI runner into a timeout, so run them
|
|
* one at a time, matching the repo's `pnpm test --no-file-parallelism`.
|
|
*/
|
|
fileParallelism: false,
|
|
},
|
|
// @ts-ignore
|
|
plugins: [tsconfigPaths({ projects: ["./tsconfig.json"] })],
|
|
});
|