-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ci.ts
More file actions
46 lines (42 loc) · 1.51 KB
/
vitest.config.ci.ts
File metadata and controls
46 lines (42 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig } from 'vitest/config';
import baseConfig from './vite.config';
/**
* CI-specific Vitest configuration
* Only runs tests critical for deployment functionality
* Excludes development tool tests that are already validated locally
*/
export default defineConfig({
...baseConfig,
test: {
...(baseConfig.test || {}),
// Only include deployment-critical tests
include: [
// Component tests - these ensure UI functionality works in production
'packages/theme/src/tests/components/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
// Configuration tests - critical for proper site behavior
'packages/theme/src/tests/config/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
// Deployment tests - external service connectivity for CI environments
'packages/theme/src/tests/deployment/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
exclude: [
...(baseConfig.test?.exclude || []),
// Exclude all development tool tests
'packages/theme/src/tests/scripts/**',
// Exclude any tests that require external services in development
'**/vocabulary-comparison*.test.{js,ts}',
'**/google-sheets*.test.{js,ts}',
'**/create-vocabulary*.test.{js,ts}',
'**/detect-language*.test.{js,ts}',
],
// Faster CI execution
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
}
},
// More aggressive timeout for CI
testTimeout: 30000,
hookTimeout: 30000,
},
});