Try splitting up unit and integration tests
CI Pipeline / test (20) (pull_request) Successful in 2m51s
CI Pipeline / test (18) (pull_request) Successful in 3m9s
CI Pipeline / e2e (chromium) (pull_request) Successful in 3m6s
CI Pipeline / e2e (firefox) (pull_request) Successful in 4m13s
CI Pipeline / e2e (webkit) (pull_request) Successful in 3m35s
CI Pipeline / performance (pull_request) Successful in 2m37s
CI Pipeline / storybook (pull_request) Successful in 1m24s
CI Pipeline / lint (pull_request) Successful in 1m9s
CI Pipeline / build (pull_request) Successful in 1m22s
CI Pipeline / visual-regression (pull_request) Successful in 3m51s

This commit is contained in:
adilallo
2025-09-14 13:55:03 -06:00
parent 9ca35b8c02
commit 2550eaa9b9
2 changed files with 20 additions and 20 deletions
+4 -4
View File
@@ -40,13 +40,13 @@ jobs:
echo "CPU info: $(sysctl -n machdep.cpu.brand_string || uname -m)" echo "CPU info: $(sysctl -n machdep.cpu.brand_string || uname -m)"
- run: | - run: |
echo "Running tests with CI optimizations..." echo "Running tests with CI optimizations..."
# Run tests in smaller batches to reduce memory pressure # Run tests in smaller batches to avoid resource contention
echo "Running unit tests..." echo "Running unit tests..."
npm test -- tests/unit/ --reporter=verbose --run --bail=1 npm test -- tests/unit/ --run --reporter=verbose --no-coverage --maxConcurrency=1
echo "Running integration tests..." echo "Running integration tests..."
npm test -- tests/integration/ --reporter=verbose --run --bail=1 npm test -- tests/integration/ --run --reporter=verbose --no-coverage --maxConcurrency=1
echo "Running accessibility tests..." echo "Running accessibility tests..."
npm test -- tests/accessibility/ --reporter=verbose --run --bail=1 npm test -- tests/accessibility/ --run --reporter=verbose --no-coverage --maxConcurrency=1
# If the Codecov Action fails on Gitea, replace this with the bash uploader below # If the Codecov Action fails on Gitea, replace this with the bash uploader below
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v3
+16 -16
View File
@@ -44,24 +44,24 @@ export default defineConfig({
// Disable coverage collection in CI to prevent test failures // Disable coverage collection in CI to prevent test failures
enabled: !process.env.CI, enabled: !process.env.CI,
}, },
pool: process.env.CI ? "vmThreads" : "threads", // Use vmThreads in CI for better isolation pool: "threads", // Use threads for better performance
testTimeout: process.env.CI ? 180000 : 30000, // 180s for CI, 30s for local testTimeout: 60000, // 60s timeout for all tests
hookTimeout: process.env.CI ? 180000 : 30000, // 180s for CI, 30s for local hookTimeout: 60000, // 60s timeout for hooks
teardownTimeout: process.env.CI ? 180000 : 30000, // 180s for CI, 30s for local teardownTimeout: 60000, // 60s timeout for teardown
// CI optimizations // Conservative settings for stability
maxConcurrency: process.env.CI ? 1 : 5, // Single test at a time in CI maxConcurrency: 1, // Single test at a time to avoid resource contention
maxThreads: process.env.CI ? 1 : 4, // Single thread in CI maxThreads: 1, // Single thread to avoid resource contention
minThreads: process.env.CI ? 1 : 2, // Minimum threads in CI minThreads: 1, // Minimum threads
retry: process.env.CI ? 3 : 0, // More retries in CI retry: 0, // No retries to avoid masking issues
// Additional stability measures // Stability measures
isolate: process.env.CI ? true : false, // Better isolation in CI isolate: true, // Enable isolation for better test stability
passWithNoTests: true, // Don't fail if no tests found passWithNoTests: true, // Don't fail if no tests found
// Additional CI timeout settings // Timeout settings
workerTimeout: process.env.CI ? 300000 : 60000, // 5min for CI, 1min for local workerTimeout: 120000, // 2min for worker timeout
poolTimeout: process.env.CI ? 300000 : 60000, // 5min for CI, 1min for local poolTimeout: 120000, // 2min for pool timeout
// Disable problematic features in CI // Optimize dependencies
deps: { deps: {
inline: process.env.CI ? [] : undefined, // Don't inline dependencies in CI inline: ["@testing-library/jest-dom"], // Inline testing library
}, },
}, },
}); });