Files
TREK/server/vitest.shard.config.ts
T
Maurice 97b748555f ci: run the tests beside the gates, and the client and server suites in shards
The test jobs waited for the quality jobs (~9 min) and the client suite ran
on one runner (20-35 min), so a run took 45-60 min before ci-ok answered.
Every test job now starts right after changes. The client suite runs in
eight slices and the server suite in six, each with coverage into a blob
report; client-coverage and server-coverage merge the blobs, check the
thresholds against the whole and upload the lcov the scan reads. The scan
needs the gates directly, so a failed gate still stops it.
2026-10-20 07:57:23 +02:00

18 lines
757 B
TypeScript

import { defineConfig } from 'vitest/config';
import base from './vitest.config';
// One slice of the suite, for a Server Tests shard in test.yml
// (`vitest run --config vitest.shard.config.ts --coverage --shard=i/n`). The
// slice hands its coverage on in a blob report, and the Server Coverage job
// merges the blobs and checks the whole against the per-domain thresholds in
// vitest.config.ts. A slice alone sits far below them, so it neither checks
// them nor writes a report of its own. tests/unit/coverage-thresholds.test.ts
// reads vitest.config.ts itself, so it still sees every entry.
export default defineConfig({
...base,
test: {
...base.test,
coverage: { ...base.test?.coverage, thresholds: undefined, reporter: [] },
},
});