From e4fbcbb45a274036b505faa637e7699e534b8f7f Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 23 Jun 2026 15:07:51 +0200 Subject: [PATCH 1/3] ci: test GCS Playwright report upload (plugin-actions#253) --- .github/workflows/playwright.yml | 10 +++------- .../tests/as-admin-user/forced-failure.spec.ts | 11 +++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 packages/plugin-e2e/tests/as-admin-user/forced-failure.spec.ts diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 8e37be23c4..1cb949cdc0 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -103,15 +103,11 @@ jobs: needs: [playwright-tests] runs-on: ubuntu-x64 permissions: - contents: write + id-token: write pull-requests: write steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: Publish report - uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@5da62466881cdba091672353cf3c72ca348d01b1 # deploy-report-pages/v1.1.0 + uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@9a83ca76bfa15893ff19680a12929dd708dc9b4c # plugin-actions#253 (GCS reports) - TEMP, do not merge with: github-token: ${{ secrets.GITHUB_TOKEN }} - retention-days: 7 + bucket: grafana-e2e-test-artifacts diff --git a/packages/plugin-e2e/tests/as-admin-user/forced-failure.spec.ts b/packages/plugin-e2e/tests/as-admin-user/forced-failure.spec.ts new file mode 100644 index 0000000000..c65f8de23d --- /dev/null +++ b/packages/plugin-e2e/tests/as-admin-user/forced-failure.spec.ts @@ -0,0 +1,11 @@ +import { test, expect } from '../../src'; +import * as semver from 'semver'; + +// TEMP (plugin-actions#253): force a failure on Grafana >= 12 so that failing Playwright reports +// upload to GCS and render in the PR comment. remove before merging. +test('forced failure on Grafana >= 12 (plugin-actions#253)', async ({ grafanaVersion }) => { + expect( + semver.gte(grafanaVersion, '12.0.0'), + `Grafana "${grafanaVersion}" >= 12 - forcing failure to exercise GCS report upload` + ).toBe(false); +}); From a397b36804ad2de68fde0e421a39a1807d74c78c Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Thu, 25 Jun 2026 14:47:40 +0200 Subject: [PATCH 2/3] ci: use plugin-ci-workflows report actions + dev GCS bucket Point the E2E report flow at the new actions from grafana/plugin-ci-workflows#819 (upload-report-artifacts + publish-report) and the dev bucket from grafana/deployment_tools#626295. publish-report impersonates the github-e2e-test-artifacts SA so uploads to dev-grafana-e2e-test-artifacts are authorized. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/playwright.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 1cb949cdc0..181f3dee24 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -91,12 +91,14 @@ jobs: id: run-tests run: npm run playwright:test --w @grafana/plugin-e2e - - name: Upload e2e test summary - uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@fa3356df288e68f5e900ab466e98b0bf9bad3118 # upload-report-artifacts/v1.0.1 + - name: Upload report artifacts + uses: grafana/plugin-ci-workflows/actions/plugins/playwright-reports/upload-report-artifacts@6dec0ef6a1e3f6eaf4411b2bcb6ed2793a11d883 # PR grafana/plugin-ci-workflows#819 (GCS reports) - TEMP, do not merge if: ${{ always() && !cancelled() }} with: test-outcome: ${{ steps.run-tests.outcome }} report-dir: packages/plugin-e2e/playwright-report + grafana-image: ${{ matrix.GRAFANA_IMAGE.NAME }} + grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} publish-report: if: ${{ always() && !cancelled() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }} @@ -105,9 +107,10 @@ jobs: permissions: id-token: write pull-requests: write + contents: read steps: - name: Publish report - uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@9a83ca76bfa15893ff19680a12929dd708dc9b4c # plugin-actions#253 (GCS reports) - TEMP, do not merge + uses: grafana/plugin-ci-workflows/actions/plugins/playwright-reports/publish-report@6dec0ef6a1e3f6eaf4411b2bcb6ed2793a11d883 # PR grafana/plugin-ci-workflows#819 (GCS reports) - TEMP, do not merge with: - github-token: ${{ secrets.GITHUB_TOKEN }} - bucket: grafana-e2e-test-artifacts + bucket: dev-grafana-e2e-test-artifacts + service-account: github-e2e-test-artifacts@grafanalabs-workload-identity.iam.gserviceaccount.com From e6eb17685350fff38b4115b42352a78c544fe2d3 Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Thu, 25 Jun 2026 15:27:24 +0200 Subject: [PATCH 3/3] ci: bump plugin-ci-workflows report actions to fa3c4c2 Co-Authored-By: Claude Opus 4.8 --- .github/workflows/playwright.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 9f44c425e6..52faed8777 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -92,7 +92,7 @@ jobs: run: npm run playwright:test --w @grafana/plugin-e2e - name: Upload report artifacts - uses: grafana/plugin-ci-workflows/actions/plugins/playwright-reports/upload-report-artifacts@6dec0ef6a1e3f6eaf4411b2bcb6ed2793a11d883 # PR grafana/plugin-ci-workflows#819 (GCS reports) - TEMP, do not merge + uses: grafana/plugin-ci-workflows/actions/plugins/playwright-reports/upload-report-artifacts@fa3c4c2356b64475bdcdee63d7e2111abea0c39f # PR grafana/plugin-ci-workflows#819 (GCS reports) - TEMP, do not merge if: ${{ always() && !cancelled() }} with: test-outcome: ${{ steps.run-tests.outcome }} @@ -110,7 +110,7 @@ jobs: contents: read steps: - name: Publish report - uses: grafana/plugin-ci-workflows/actions/plugins/playwright-reports/publish-report@6dec0ef6a1e3f6eaf4411b2bcb6ed2793a11d883 # PR grafana/plugin-ci-workflows#819 (GCS reports) - TEMP, do not merge + uses: grafana/plugin-ci-workflows/actions/plugins/playwright-reports/publish-report@fa3c4c2356b64475bdcdee63d7e2111abea0c39f # PR grafana/plugin-ci-workflows#819 (GCS reports) - TEMP, do not merge with: bucket: dev-grafana-e2e-test-artifacts service-account: github-e2e-test-artifacts@grafanalabs-workload-identity.iam.gserviceaccount.com