Ngrok parallel tunnel support for parallel tests - #270
Open
mishautkin wants to merge 2 commits into
Open
Conversation
tyrann0us
approved these changes
Aug 13, 2026
| NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} | ||
| if: ${{ inputs.NGROK_ENABLED && env.NGROK_AUTH_TOKEN != '' }} | ||
| run: | | ||
| npx wp-env run tests-cli wp eval ' |
Member
There was a problem hiding this comment.
"How many commands should we chain? - @mishautkin: "Yes!" 😆
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)
The ngrok used a single fixed domain, so parallel matrix jobs sharing that domain collided with ERR_NGROK_334. WordPress also wasn't aware that the forwarded requests were HTTPS.
What is the new behavior (if this is a feature change)?
By default the tunnel starts with no domain, so each job gets a random URL that is parallel-safe. An optionalc reserved NGROK_DOMAIN still can be used when set. NGROK_ENABLED allows to skip ngrok for jobs that don't require it. The forwarded port is taken from .wp-env.json testsPort, and an mu-plugin trusts X-Forwarded-Proto so WordPress treats tunnelled requests as HTTPS.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.
Security impact
Requires NGROK_AUTH_TOKEN as a secret; the tunnel steps are skipped when it's unset. While active, the tunnel exposes the test WordPress instance on a public URL for the duration of the run.