Fix/test playwright#223
Merged
Merged
Conversation
PRE_SCRIPT might require access to env vars (e.g. for VIP authentication).
dottxado
requested changes
Feb 19, 2026
Biont
reviewed
Feb 24, 2026
Update how `.env.ci` is created
Replace `echo "${{ secrets.ENV_FILE_DATA }}"` with `printenv` to
avoid bash interpreting special characters ($, `, !) in secret values.
The double-quoted echo caused `$` characters in passwords and tokens
to be treated as variable references, silently truncating values in
the resulting .env.ci file.
Signed-off-by: Misha Utkin <80261935+mishautkin@users.noreply.github.com>
…able-workflows into fix/test-playwright
Contributor
Author
Member
Acknowledged. This is a reasonable and useful addition in my eyes. |
Member
|
Suggestion
This approach should work for websites and plugins alike: The workflow sets up the environment and test subject for you. How to test is wired up in |
Playwright: Improve local build tooling
3 tasks
…act-inputs Rename ARTIFACT_ inputs in test-playwright.yml
3 tasks
Parse WP_HOME from .wp-env.json and add the hostname to /etc/hosts when it is not localhost. This ensures the CI runner resolves the custom domain to 127.0.0.1 so Playwright requests reach the local wp-env container instead of the real DNS target.
…able-workflows into fix/test-playwright
Replace `npm -g i @wordpress/env && wp-env start` with `npx wp-env start` to ensure the same version is used for both `start` and `run` commands. The global install could resolve a different version than the local devDependency, producing a different state directory hash and causing `wp-env run` to fail with "docker-compose.yml: no such file or directory".
Add npx prefix to wp-env commands to match the local devDependency, consistent with the boot step change that removed the global wp-env install.
Test-playwright.yml - remove WORK_DIR
…into fix/test-playwright
…able-workflows into fix/test-playwright
Contributor
Author
|
The I did CI runs with latest changes on several involved projects. |
Chrico
approved these changes
May 12, 2026
dottxado
approved these changes
May 12, 2026
Contributor
dottxado
left a comment
There was a problem hiding this comment.
Thanks for this huge work 💪 I loved that you added a good collection of examples!
I have found only two minor issues in the documentation, but nothing that prevents me from approving 💪
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.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature.
What is the current behavior? (You can also link to an open issue here)
npmand Playwright operations run from the repository root, forcingcdworkarounds for projects in subdirectories.PRE_SCRIPThas no access to GitHub CLI authentication, preventing artifact downloads from previous jobs.SCRIPT_NAMEnpm script, with no way to run Playwright directly with grep or project filters.What is the new behavior (if this is a feature change)?
WORK_DIRinput (defaults to .) — applies to npm install, Playwright install, PRE_SCRIPT, and test execution. In case of several qa projects (e.g. support of legacy UI on PCP) it would allow to use another palywright project.GH_TOKENinPRE_SCRIPTstep for GitHub CLI usage (e.g. gh run download).PLAYWRIGHT_GREP,PLAYWRIGHT_GREP_INVERT,PLAYWRIGHT_PROJECTinputs — passes--project,--grep,--grep-invertflags to Playwright when using grep mode.SCRIPT_NAMEis now optional, used only whenPLAYWRIGHT_GREPis not set..env.cicreation to a separate step becausePRE_SCRIPTmight require access to env vars (e.g. for VIP authentication).Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.