From 94f211ed428d7548ed46925f50df89261a09a6b4 Mon Sep 17 00:00:00 2001 From: Hugo Oshiro Date: Wed, 22 Apr 2026 16:32:25 +0200 Subject: [PATCH 1/4] feat: add plugin-directory support for playwright --- .github/workflows/playwright.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 01bbce71a..a9f515646 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -94,6 +94,15 @@ jobs: with: persist-credentials: false + - name: Read Grafana dependency from plugin.json + id: read-grafana-dep + if: inputs.plugin-directory != '.' && inputs.grafana-dependency == '' + run: | + DEP=$(jq -r '.dependencies.grafanaDependency // empty' "${PLUGIN_DIRECTORY}/src/plugin.json") + echo "grafana-dependency=${DEP}" >> "$GITHUB_OUTPUT" + env: + PLUGIN_DIRECTORY: ${{ inputs.plugin-directory }} + - name: Resolve Grafana E2E versions id: resolve-versions uses: grafana/plugin-actions/e2e-version@e2e-version/v1.2.1 @@ -101,7 +110,7 @@ jobs: skip-grafana-dev-image: ${{ inputs.skip-grafana-dev-image }} skip-grafana-react-19-preview-image: ${{ inputs.skip-grafana-react-19-preview-image }} version-resolver-type: ${{ inputs.version-resolver-type }} - grafana-dependency: ${{ inputs.grafana-dependency }} + grafana-dependency: ${{ inputs.grafana-dependency || steps.read-grafana-dep.outputs.grafana-dependency }} playwright-tests: needs: resolve-versions From a31ccb3d9a6daac4decf168f8785f7a9e774ff6c Mon Sep 17 00:00:00 2001 From: Hugo Oshiro Date: Fri, 24 Apr 2026 17:41:45 +0200 Subject: [PATCH 2/4] point playwright to branch for testing --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57187e7ae..488777455 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -707,7 +707,7 @@ jobs: playwright: name: Playwright E2E tests - uses: grafana/plugin-ci-workflows/.github/workflows/playwright.yml@main + uses: grafana/plugin-ci-workflows/.github/workflows/playwright.yml@use-plugin-directory-on-playwrite if: ${{ inputs.run-playwright == true }} needs: - test-and-build From ac63b19d2485ddaddd54badc7f91680ca676d306 Mon Sep 17 00:00:00 2001 From: Hugo Oshiro Date: Fri, 24 Apr 2026 18:54:36 +0200 Subject: [PATCH 3/4] fix playwright.yml --- .github/workflows/playwright.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index a9f515646..f741a3018 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -188,6 +188,7 @@ jobs: - name: Install Playwright Browsers run: ${{ steps.setup.outputs.node-package-manager-exec-local-cmd }} playwright install --with-deps chromium shell: bash + working-directory: ${{ inputs.plugin-directory }} - name: Download GitHub artifact uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 From 9e72ee3ac10639305e2329a23f8039674cdec82a Mon Sep 17 00:00:00 2001 From: Hugo Oshiro Date: Fri, 24 Apr 2026 19:04:58 +0200 Subject: [PATCH 4/4] Change reference back to main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 488777455..57187e7ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -707,7 +707,7 @@ jobs: playwright: name: Playwright E2E tests - uses: grafana/plugin-ci-workflows/.github/workflows/playwright.yml@use-plugin-directory-on-playwrite + uses: grafana/plugin-ci-workflows/.github/workflows/playwright.yml@main if: ${{ inputs.run-playwright == true }} needs: - test-and-build