From 261814ae65c008e23a5340bd9922d7cabc3f8996 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Sat, 25 Apr 2026 15:59:00 -0400 Subject: [PATCH] =?UTF-8?q?perf(ci):=20decouple=20e2e=20from=20frontend=20?= =?UTF-8?q?=E2=80=94=20build=20frontend=20inline=20in=20e2e=20job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: e2e \`needs: [frontend]\` waited for the frontend job to upload a build artifact, then downloaded it. With multiple runners this means the third runner sat idle for ~6 min while frontend ran, then started e2e — total wall-clock max(backend, frontend+e2e) ≈ 11 min. After: e2e builds its own frontend (npm ci + npm run build are already in the job; just dropped the artifact download step and added the build). e2e starts immediately on a free runner. Adds ~1-2 min to the e2e job duration but removes ~5 min of waiting and eliminates the cross-job artifact mechanism entirely. Side benefit: no more \`actions/upload-artifact\` v3/v4 GHES headaches on the cross-job handoff. The \`if: always()\` upload of the playwright-report at the end of e2e is kept (failure report retrieval is still useful), but it's a leaf-output, not a dependency. Net wall-clock: max(backend=9m, frontend=6m, e2e=7m) ≈ 9 min on the 3-runner setup, down from ~11 min. Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/ci.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4399db68..26275382 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -125,15 +125,14 @@ jobs: - name: Build run: cd frontend && NODE_OPTIONS="--max-old-space-size=4096" npm run build - - name: Upload build artifact - uses: actions/upload-artifact@v3 - with: - name: frontend-dist - path: frontend/dist - retention-days: 1 + # Build artifact intentionally NOT uploaded. The e2e job below builds + # its own frontend rather than downloading one from this job, so there + # is no need for the cross-job artifact handoff (which previously broke + # on actions/upload-artifact@v4 GHES support and forced a v3 pin). + # Decoupling also lets e2e start immediately rather than waiting for + # this job to finish — important on a multi-runner setup. e2e: - needs: [frontend] runs-on: ubuntu-latest services: @@ -188,11 +187,13 @@ jobs: - name: Install frontend dependencies run: cd frontend && npm ci - - name: Download frontend build - uses: actions/download-artifact@v3 - with: - name: frontend-dist - path: frontend/dist + - name: Build frontend + # Building inline (instead of downloading an artifact from the + # frontend job) drops the cross-job dependency, so e2e can start + # immediately on a free runner. Adds ~1-2 min of build time, but + # eliminates the artifact-upload mechanism entirely (no more + # v3/v4 GHES headaches) and saves ~5 min of waiting. + run: cd frontend && NODE_OPTIONS="--max-old-space-size=4096" npm run build - name: Install Playwright browser run: cd frontend && npx playwright install --with-deps chromium