Skip to content

ci: run the e2e suite on pull requests that are ready for review - #51

Merged
domiebett merged 8 commits into
mainfrom
dkb/e2e-pr-trigger
Oct 21, 2026
Merged

domiebett merged 8 commits into
mainfrom
dkb/e2e-pr-trigger

Conversation

@domiebett

Copy link
Copy Markdown
Contributor

Runs the e2e suite on pull requests that are ready for review, so it no longer needs a manual dispatch.

What changed

  • e2e-tests.yml also runs on pull_request (opened, synchronize, reopened, ready_for_review). The e2e job skips drafts, so marking a draft ready starts a run.
  • It also skips pull requests from forks, which get no secrets. The workflow stays on pull_request, not pull_request_target, so code from a fork never runs with the API key.
  • A path filter limits it to changes to the plugin (ceros.php, includes/, src/, public/), its build inputs (package.json, package-lock.json, .wp-env.json), the suite and this workflow.
  • A new push cancels the run it replaces. The concurrency group now includes the event name, so a push to main never cancels a manual run on main.
  • A warm-cache job runs on pushes to main that change a lockfile or this workflow. It installs both packages under the e2e cache key, without WordPress, a browser or the secret. Branches can only restore caches saved on main, and main never ran e2e, so every pull request missed on its first run and saved its own copy.
  • E2E_CEROS_ENV falls back to latest when there is no dispatch input, and the workflow is renamed from "E2E (manual)" to "E2E".
  • e2e README: the CI section describes when the suite runs. It is still not a required check.

Running

  • actionlint passes.
  • This pull request is the test: opened as a draft, the e2e job should be skipped. Once it is marked ready, the suite should run and pass. The warm-cache job can only be checked after merge.

wp-env now starts in the background while the e2e dependencies and Chrome install, and a later step waits for it and prints its log. WordPress core comes from the release zip instead of a git clone.
The e2e workflow keyed its npm cache on both lockfiles, a key nothing on main saves, so every branch run missed it. Keying on the root lockfile, as ci.yml does, reuses the cache ci.yml saves on main.
Skips drafts, fork pull requests (no secrets) and changes outside the plugin,
its build inputs and the suite. A small job on main saves the npm cache under
the e2e key, so pull request runs restore it instead of saving their own.
@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@domiebett
domiebett marked this pull request as ready for review October 15, 2026 15:54
@domiebett
domiebett merged commit 39146bd into main Oct 21, 2026
13 checks passed
@domiebett
domiebett deleted the dkb/e2e-pr-trigger branch October 21, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants