Skip to content

feat: add playwright-config input to frontend-e2e-against-stack action#754

Merged
xnyo merged 4 commits into
mainfrom
feat/playwright-config-input
May 28, 2026
Merged

feat: add playwright-config input to frontend-e2e-against-stack action#754
xnyo merged 4 commits into
mainfrom
feat/playwright-config-input

Conversation

@srsholmes
Copy link
Copy Markdown
Contributor

@srsholmes srsholmes commented May 27, 2026

Summary

Adds a new optional playwright-config input to actions/plugins/frontend-e2e-against-stack so callers can point the action at a specific Playwright config when their repo maintains more than one.

- uses: grafana/plugin-ci-workflows/actions/plugins/frontend-e2e-against-stack@…
  with:
    stack-slug: my-stack
    env: dev-central
    playwright-config: e2e/assistant/playwright.config.ts

Why

Today the action runs `npx playwright test` unconditionally, which falls back to Playwright's own resolution (playwright.config.ts in the working directory). That's fine for the single-config case but leaves no escape hatch when a repo has more than one Playwright config — typically when a stack-based integration suite has different workers / timeouts / project settings from the main e2e suite.

Backwards compatibility

Empty default preserves current behaviour — existing callers see no change.

Test plan

  • Verify the action still runs cleanly for an existing caller that does NOT set playwright-config (e.g. via a release-please preview or a manual workflow_dispatch in a consumer repo)
  • Verify a caller that DOES set playwright-config: path/to/custom.config.ts runs against that config
  • Marking as Draft until at least one in-repo verification run — happy to take direction on how this project typically validates action changes (mirror PR in a consumer repo?)

🤖 Generated with Claude Code

Allow callers to point the action at a specific Playwright config file
when their repo has multiple. Today the action runs `npx playwright
test`, which falls back to whatever Playwright resolves in the working
directory — fine for the common case of a single `playwright.config.ts`,
but no escape hatch when a repo wants to run a different config under
the stack (e.g. an integration-test config separate from the main e2e
suite, distinct workers / timeouts / project settings).

Backwards-compatible: empty default keeps current behaviour.

Motivating use case: grafana/grafana-dbo11y-app currently maintains a
local copy of this action specifically to expose this knob (their
`e2e-assistant` suite uses a separate config from the main e2e). Adding
it upstream lets that repo (and any others with the same shape) drop
the fork.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 27, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 27, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread actions/plugins/frontend-e2e-against-stack/action.yml Fixed
srsholmes and others added 2 commits May 27, 2026 12:37
Drop the "useful when..." sentence — redundant with what the input
already says and adds noise.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ht-config

Addresses the zizmor / code-scanning finding (PR #754, code-scanning
alert 95).

Inlining `${{ inputs.playwright-config }}` directly into a `run:`
script substitutes the value before the shell parses it — a malicious
caller could pass `foo.ts; rm -rf /` and inject arbitrary commands.

Move the input to `env:` and let bash expand it at runtime via
`${VAR:+--flag="$VAR"}` parameter substitution. The shell handles
quoting; metacharacters can't break out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@srsholmes srsholmes changed the title feat(frontend-e2e-against-stack): add playwright-config input feat: add playwright-config input to frontend-e2e-against-stack action May 27, 2026
@srsholmes srsholmes marked this pull request as ready for review May 27, 2026 12:38
@srsholmes srsholmes requested a review from a team as a code owner May 27, 2026 12:38
@srsholmes srsholmes requested review from mckn, sunker and xnyo May 27, 2026 12:38
…wright-config

More readable than the ${VAR:+VALUE} one-liner — same behaviour.
Copy link
Copy Markdown
Contributor

@yduartep yduartep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@tolzhabayev tolzhabayev moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 28, 2026
@xnyo xnyo merged commit 8dc0ff6 into main May 28, 2026
13 checks passed
@xnyo xnyo deleted the feat/playwright-config-input branch May 28, 2026 10:54
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

5 participants