perf: speed up e2e tests in CI

- Pre-build before Playwright instead of building inside webServer
- Reduce retries from 2 to 1 (fix flaky tests instead of masking them)
- Set CI workers to 4 for more parallelism
- Reduce artifact retention from 30 to 7 days

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-10 07:46:22 +01:00
co-authored by Claude Opus 4.6
parent 329061fe7e
commit f63cb6db1d
2 changed files with 10 additions and 3 deletions
+7 -1
View File
@@ -80,6 +80,12 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Build
run: pnpm build
env:
DATABASE_URL: ./data/test-crumbs.db
NODE_ENV: test
- run: pnpm test:e2e
env:
CI: true
@@ -91,7 +97,7 @@ jobs:
path: |
playwright-report/
test-results/
retention-days: 30
retention-days: 7
docker-build:
name: Docker Build
+3 -2
View File
@@ -4,7 +4,8 @@ export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? 4 : undefined,
reporter: 'html',
globalSetup: './tests/e2e/global-setup.ts',
use: {
@@ -27,7 +28,7 @@ export default defineConfig({
}
],
webServer: {
command: 'pnpm build && pnpm preview --port 4173',
command: 'pnpm preview --port 4173',
port: 4173,
reuseExistingServer: !process.env.CI,
timeout: 120_000,