Content Page #19

Merged
an.di merged 48 commits from adilallo/feature/Blog into main 2025-09-18 15:44:46 +00:00
2 changed files with 12 additions and 4 deletions
Showing only changes of commit c6c4425846 - Show all commits
+6 -1
View File
@@ -22,6 +22,9 @@ jobs:
VITEST_POOL_OPTIONS: '{"threads":{"singleThread":true}}'
VITEST_LOG_LEVEL: "info"
DEBUG: "vitest:*"
VITEST_WORKER_TIMEOUT: "300000"
VITEST_POOL_TIMEOUT: "300000"
VITEST_FORCE_RERUN_TRIGGERS: "**"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
@@ -35,7 +38,9 @@ jobs:
echo "NPM version: $(npm -v)"
echo "Available memory: $(free -h || vm_stat | head -10)"
echo "CPU info: $(sysctl -n machdep.cpu.brand_string || uname -m)"
- run: npm test -- --reporter=verbose
- run: |
echo "Running tests with CI optimizations..."
npm test -- --reporter=verbose --no-coverage --run
# If the Codecov Action fails on Gitea, replace this with the bash uploader below
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
+6 -3
View File
@@ -43,13 +43,16 @@ export default defineConfig({
thresholds: { lines: 50, functions: 50, statements: 50, branches: 50 },
},
pool: process.env.CI ? "forks" : "threads", // Use forks in CI for better stability
testTimeout: process.env.CI ? 120000 : 30000, // 120s for CI, 30s for local
hookTimeout: process.env.CI ? 120000 : 30000, // 120s for CI, 30s for local
teardownTimeout: process.env.CI ? 120000 : 30000, // 120s for CI, 30s for local
testTimeout: process.env.CI ? 180000 : 30000, // 180s for CI, 30s for local
hookTimeout: process.env.CI ? 180000 : 30000, // 180s for CI, 30s for local
teardownTimeout: process.env.CI ? 180000 : 30000, // 180s for CI, 30s for local
// CI optimizations
maxConcurrency: process.env.CI ? 1 : 5, // Single test at a time in CI
maxThreads: process.env.CI ? 1 : 4, // Single thread in CI
minThreads: process.env.CI ? 1 : 2, // Minimum threads in CI
retry: process.env.CI ? 3 : 0, // More retries in CI
// Additional CI timeout settings
workerTimeout: process.env.CI ? 300000 : 60000, // 5min for CI, 1min for local
poolTimeout: process.env.CI ? 300000 : 60000, // 5min for CI, 1min for local
},
});