fix: reuse frontend build artifact in e2e instead of rebuilding

The e2e job was running a full Vite build on the same runner as the
backend + Postgres, causing OOM. Now:
- Frontend job uploads dist/ as an artifact
- E2E job depends on frontend, downloads the artifact
- Playwright webServer skips build in CI, just runs preview
- Locally still builds as before

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-27 16:42:04 +00:00
parent ba6a8af251
commit 9150972de9
2 changed files with 18 additions and 2 deletions

View File

@@ -38,10 +38,12 @@ export default defineConfig({
},
},
{
command: 'NODE_OPTIONS="--max-old-space-size=4096" npm run build && npm run preview -- --host 127.0.0.1 --port 4173',
command: process.env.CI
? 'npm run preview -- --host 127.0.0.1 --port 4173'
: 'NODE_OPTIONS="--max-old-space-size=4096" npm run build && npm run preview -- --host 127.0.0.1 --port 4173',
url: frontendBaseUrl,
reuseExistingServer: !process.env.CI,
timeout: 180_000,
timeout: 120_000,
env: {
...process.env,
VITE_API_URL: apiOrigin,