Skip to content

Commit 88b9a04

Browse files
jonphippsclaude
andcommitted
fix: improve test stability for CI environments
- Add 30s timeout for CI test execution - Reduce concurrency to 1 in CI to avoid race conditions - Use process forks for better test isolation - Add retry mechanism (2 retries) for flaky tests in CI - Enable heap usage logging for CI debugging These changes should resolve intermittent test failures in CI environments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 07fc74a commit 88b9a04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,11 @@ export default defineConfig({
3030
setupFiles: ['./packages/theme/src/tests/setup.ts'],
3131
include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
3232
exclude: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/e2e/**'],
33+
// CI stability improvements
34+
testTimeout: 30000, // 30 second timeout for CI environments
35+
maxConcurrency: process.env.CI ? 1 : 5, // Reduce concurrency in CI
36+
pool: 'forks', // Use process forks for better isolation
37+
retry: process.env.CI ? 2 : 0, // Retry flaky tests in CI
38+
logHeapUsage: !!process.env.CI, // Monitor memory usage in CI
3339
},
3440
});

0 commit comments

Comments
 (0)