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 16 additions and 6 deletions
Showing only changes of commit c030187bc8 - Show all commits
+12 -2
View File
@@ -17,6 +17,11 @@ jobs:
CI: true CI: true
VITEST_MAX_CONCURRENCY: 1 VITEST_MAX_CONCURRENCY: 1
VITEST_MAX_THREADS: 1 VITEST_MAX_THREADS: 1
VITEST_MIN_THREADS: 1
VITEST_POOL: "threads"
VITEST_POOL_OPTIONS: '{"threads":{"singleThread":true}}'
VITEST_LOG_LEVEL: "info"
DEBUG: "vitest:*"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
@@ -24,8 +29,13 @@ jobs:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: npm cache: npm
- run: npm ci - run: npm ci
- run: npm test - name: Show system info
run: |
echo "Node.js version: $(node -v)"
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: timeout 600 npm test -- --reporter=verbose
# 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
+4 -4
View File
@@ -42,10 +42,10 @@ export default defineConfig({
], ],
thresholds: { lines: 50, functions: 50, statements: 50, branches: 50 }, thresholds: { lines: 50, functions: 50, statements: 50, branches: 50 },
}, },
pool: "threads", pool: process.env.CI ? "forks" : "threads", // Use forks in CI for better stability
testTimeout: process.env.CI ? 60000 : 30000, // 60s for CI, 30s for local testTimeout: process.env.CI ? 120000 : 30000, // 120s for CI, 30s for local
hookTimeout: process.env.CI ? 60000 : 30000, // 60s for CI, 30s for local hookTimeout: process.env.CI ? 120000 : 30000, // 120s for CI, 30s for local
teardownTimeout: process.env.CI ? 60000 : 30000, // 60s for CI, 30s for local teardownTimeout: process.env.CI ? 120000 : 30000, // 120s for CI, 30s for local
// CI optimizations // CI optimizations
maxConcurrency: process.env.CI ? 1 : 5, // Single test at a time in CI maxConcurrency: process.env.CI ? 1 : 5, // Single test at a time in CI
maxThreads: process.env.CI ? 1 : 4, // Single thread in CI maxThreads: process.env.CI ? 1 : 4, // Single thread in CI