From ad81cda33f0db022d093b90dc54797cb9d316798 Mon Sep 17 00:00:00 2001 From: Tahasanul Abraham Date: Fri, 30 Oct 2026 08:04:40 +0100 Subject: [PATCH] feat(ci): add opt-in e2e-report-path input to upload the e2e report New generic input `e2e-report-path` (string, default ''). When set, the e2e job uploads that path (relative to the repo root) as artifact e2e-report-- on always(), continue-on-error, 7-day retention, if-no-files-found: ignore. Empty default adds no step for any existing caller. Requested by CognitiveSystems WP-61 (keep the Playwright HTML report). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ef0b63..29e1283 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,6 +175,14 @@ on: # Dockerfile.runner), so a plain install finds it instead of downloading. default: 'python -m playwright install chromium' type: string + e2e-report-path: + description: "Path (relative to the repo root, not e2e-working-dir) to upload from the e2e job as an artifact, e.g. a Playwright HTML report; empty disables the upload" + required: false + # Off by default, so callers that don't set it get no extra step. The path is + # resolved against the workspace root: `working-directory` only applies to `run` + # steps, never to `uses: actions/upload-artifact`. + default: "" + type: string secrets: ci-bot-app-id: required: false @@ -643,6 +651,18 @@ jobs: done echo "::error::E2E tests failed after 3 attempts" exit 1 + # Diagnostics, not the verdict, same reasoning as security-reports-* below: it runs + # on `always()` because the failed run is the one worth inspecting, and an upload + # blip must never turn a green e2e job red. Nothing downstream consumes it. + - name: Upload E2E report + if: always() && inputs.e2e-report-path != '' + uses: actions/upload-artifact@v7 + continue-on-error: true + with: + name: e2e-report-${{ github.run_id }}-${{ github.run_attempt }} + path: ${{ inputs.e2e-report-path }} + retention-days: 7 + if-no-files-found: ignore security: if: inputs.has-security && github.event_name == 'pull_request'