feat: add playwright-config input to frontend-e2e-against-stack action#754
Merged
Conversation
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>
|
|
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>
…wright-config
More readable than the ${VAR:+VALUE} one-liner — same behaviour.
xnyo
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new optional
playwright-configinput toactions/plugins/frontend-e2e-against-stackso callers can point the action at a specific Playwright config when their repo maintains more than one.Why
Today the action runs `npx playwright test` unconditionally, which falls back to Playwright's own resolution (
playwright.config.tsin 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
playwright-config(e.g. via a release-please preview or a manual workflow_dispatch in a consumer repo)playwright-config: path/to/custom.config.tsruns against that config🤖 Generated with Claude Code