Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@
"cache": true
},
"test": {
"cache": true
"cache": true,
"inputs": [
"default",
"^default",
"{workspaceRoot}/vitest*.ts",
"{workspaceRoot}/tools/**/*"
]
},
"test-mcp": {
"cache": true
"cache": true,
"inputs": [
"default",
"^default",
"{workspaceRoot}/vitest*.ts",
"{workspaceRoot}/tools/**/*"
]
},
"prepare-e2e-env": {
"cache": true
Expand Down
4 changes: 4 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export default defineConfig({
webServer: {
command: webServerCommand,
url: baseURL,
// Startup (client build + D1 migrations + Wrangler boot) competes with
// the parallel unit test workers at the beginning of `validate`, and the
// default 60s budget times out on 4-core CI runners.
timeout: process.env.CI ? 180_000 : 60_000,
reuseExistingServer: hasExplicitBaseUrl,
env: {
CLOUDFLARE_ENV: 'test',
Expand Down
5 changes: 4 additions & 1 deletion vitest-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export const sharedProjectConfig = {
test: {
testTimeout,
hookTimeout: testTimeout,
fileParallelism: false,
// `validate` runs this suite concurrently with Playwright and two
// Wrangler servers on 4-core CI runners; leave a core free so their
// startup is not starved by test workers.
maxWorkers: process.env.CI ? 3 : undefined,
clearMocks: true,
mockReset: true,
setupFiles: [
Expand Down
3 changes: 3 additions & 0 deletions vitest.mcp-e2e.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default mergeConfig(
include: ['**/*.mcp-e2e.test.ts'],
testTimeout: mcpE2eTimeout,
hookTimeout: mcpE2eTimeout,
// Each file boots a real Wrangler dev server and shares the seeded
// e2e database, so files must not run in parallel.
fileParallelism: false,
},
}),
)
Loading