Files
orca/cloud/apps/relay/vitest.config.ts
T
Neil 39815a086f Reduce CI import, frame-capture, teardown, and shard costs (#28879)
* Avoid unused module imports and trim cosmetic test coverage

* Capture hidden popup frames and attach CDP before guest creation

* Overlap relay test projects within the existing worker budget

* Consolidate native preparation and add an opt-in transform cache comparison

* Release inherited debugger sockets during final E2E teardown

* Refresh unit scheduling weights from all five qualified ARM shards

* Avoid retaining unasserted RPC call history in the delivery model

* Use the supported unconditional background wait syntax

* Overlap unconditional output upload with native preparation

* Verify relay integration stays enabled for ordinary unit callers
2026-10-14 17:10:55 -07:00

41 lines
1.2 KiB
TypeScript

import { readdirSync, readFileSync } from 'node:fs'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defaultExclude, defineConfig } from 'vitest/config'
// PostgreSQL files share session locks and a small connection budget.
// The runner overlaps this serialized project with SQLite tests after other packages finish.
const sourceDirectory = fileURLToPath(new URL('src', import.meta.url))
const sharedPostgresTests = readdirSync(sourceDirectory)
.filter((entry) => entry.endsWith('.test.ts'))
.filter((entry) =>
readFileSync(join(sourceDirectory, entry), 'utf8').includes('ORCA_RELAY_TEST_POSTGRES_URL')
)
.map((entry) => `src/${entry}`)
const timeouts = { testTimeout: 15_000, hookTimeout: 15_000 }
export default defineConfig({
cacheDir: process.env.ORCA_RELAY_TEST_CACHE_DIR,
test: {
projects: [
{
test: {
...timeouts,
name: 'relay',
include: ['src/**/*.test.ts'],
exclude: [...defaultExclude, ...sharedPostgresTests]
}
},
{
test: {
...timeouts,
name: 'relay-postgres',
include: sharedPostgresTests,
fileParallelism: false
}
}
]
}
})