Skip to content

feat: add generic playwright-cloud reusable workflow for Cloud E2E tests#602

Closed
adamyeats wants to merge 4 commits intomainfrom
feat/playwright-cloud-workflow
Closed

feat: add generic playwright-cloud reusable workflow for Cloud E2E tests#602
adamyeats wants to merge 4 commits intomainfrom
feat/playwright-cloud-workflow

Conversation

@adamyeats
Copy link
Copy Markdown

@adamyeats adamyeats commented Mar 12, 2026

This PR adds .github/workflows/playwright-cloud.yml, a reusable workflow for running Playwright E2E tests against a shared Grafana Cloud instance via Grafana Bench. The workflow is generic and can be called from any datasource plugin repo.

Data source-specific Vault secrets, Grafana URL, Bench commands, Bench version, and service version are all configurable via inputs. Act tests are included to validate the happy path and the fork-skip condition.

Usage in a calling repo

Create a workflow file (e.g. .github/workflows/cron.yml) in your datasource repo:

name: Scheduled Cloud E2E tests

on:
  schedule:
    - cron: '0 6 * * *'
  workflow_dispatch:

jobs:
  playwright-cloud:
    uses: grafana/plugin-ci-workflows/.github/workflows/playwright-cloud.yml@main
    secrets: inherit
    with:
      repo-secrets: |
        DS_INSTANCE_HOST=my-datasource/instance:host
        DS_INSTANCE_PASSWORD=my-datasource/instance:password
        DS_INSTANCE_PORT=my-datasource/instance:port
        DS_INSTANCE_USERNAME=my-datasource/instance:username

The keys on the left side of each = become environment variables inside the Bench container and are forwarded to the Playwright process. The values on the right are Vault paths in the format vault-secret-name:field.

If your datasource uses Private Data Source Connect, pass the PDC network name via the pdc-network-name input.

Deploying the plugin to the Cloud E2E instance

To deploy a plugin to the datasourcese2e instance on push to main, use cd.yml directly:

jobs:
  cd:
    uses: grafana/plugin-ci-workflows/.github/workflows/cd.yml@main
    with:
      environment: dev
      scopes: grafana_cloud_instance_datasourcese2e
      grafana-cloud-deployment-type: provisioned
      trigger-argo: true

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Mar 12, 2026

CLA assistant check
All committers have signed the CLA.

@adamyeats adamyeats changed the title Add generic playwright-cloud reusable workflow for Cloud E2E tests feat: add generic playwright-cloud reusable workflow for Cloud E2E tests Mar 12, 2026
Comment thread .github/workflows/playwright-cloud.yml Fixed
Comment thread .github/workflows/playwright-cloud.yml Fixed
Comment thread .github/workflows/playwright-cloud.yml Fixed
@github-actions

This comment has been minimized.

@adamyeats adamyeats added github_actions Pull requests that update GitHub Actions code plugin-ci-workflows labels Mar 12, 2026
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch from 142b17c to e4d9d22 Compare March 12, 2026 23:29
@adamyeats adamyeats moved this from Incoming to In Progress in Partner Datasources Mar 12, 2026
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch 2 times, most recently from da42848 to f3cc444 Compare March 12, 2026 23:36
@grafana-plugins-platform-bot grafana-plugins-platform-bot Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Mar 13, 2026
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch 3 times, most recently from 2fbd478 to d4b4d23 Compare March 17, 2026 19:59
@adamyeats
Copy link
Copy Markdown
Author

This is awaiting https://github.com/grafana/deployment_tools/pull/519206, and once it's merged, it'll be ready for review.

@adamyeats adamyeats moved this from In Progress to Needs Review in Partner Datasources Mar 18, 2026
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch 2 times, most recently from 096913b to 2581346 Compare March 20, 2026 23:13
@adamyeats adamyeats marked this pull request as ready for review March 20, 2026 23:13
@adamyeats adamyeats requested review from a team as code owners March 20, 2026 23:13
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch from 2581346 to 979aa67 Compare March 24, 2026 14:54
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch 2 times, most recently from a329f85 to 2be5e6c Compare March 26, 2026 19:26
@xnyo xnyo self-requested a review March 26, 2026 20:19
@adamyeats adamyeats force-pushed the feat/playwright-cloud-workflow branch from 2be5e6c to a7b3e92 Compare March 27, 2026 23:07
@adamyeats
Copy link
Copy Markdown
Author

Closing in favour of https://github.com/grafana/data-sources/pull/1095. I think, as written, these plugins are not generic enough to add to this repo. We'll add these to data-sources for now, and maybe circle back to moving them here in future if that seems like the right call.

@adamyeats adamyeats closed this Apr 2, 2026
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Apr 2, 2026
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Partner Datasources Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code plugin-ci-workflows

Projects

Archived in project
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants