diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index b137c12956..52faed8777 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -91,29 +91,26 @@ 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@fa3c4c2356b64475bdcdee63d7e2111abea0c39f # 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 }} - # TEMP DISABLED 2026-06-18: deploy-report-pages pushes an unsigned commit to gh-pages, - # which will be rejected once unsigned commits are blocked. Re-enable once resolved. - # publish-report: - # if: ${{ always() && !cancelled() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }} - # needs: [playwright-tests] - # runs-on: ubuntu-x64 - # permissions: - # contents: 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 - # with: - # github-token: ${{ secrets.GITHUB_TOKEN }} - # retention-days: 7 + publish-report: + if: ${{ always() && !cancelled() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }} + needs: [playwright-tests] + runs-on: ubuntu-x64 + permissions: + id-token: write + pull-requests: write + contents: read + steps: + - name: Publish report + 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 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); +});