Skip to content

ci: speed up plugin workflows - #859

Merged
josephfusco merged 4 commits into
mainfrom
ci/faster-plugin-checks
Oct 27, 2026
Merged

josephfusco merged 4 commits into
mainfrom
ci/faster-plugin-checks

Conversation

@josephfusco

@josephfusco josephfusco commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

End-to-End Tests is the slowest plugin workflow, so it decides when a PR gets its result. Over the last 300 runs its median was 3.3 minutes, but 8 of 36 E2E jobs took 10 to 44 minutes.

Each commit makes one change:

  1. Playwright installs Chromium without --with-deps. Every slow run was apt downloading from azure.archive.ubuntu.com at 44 to 129 kB/s, while the runner image already had Chromium's libraries.
  2. The Stop wp-env step is gone, since the runner is thrown away after the job anyway (13 seconds).
  3. Plugin job checkouts skip the 14 wp-env/uploads.zip files, which are 590 MB of the 670 MB tree and only used by the example sites. Plugins with an examples/ folder already leave it out of their archive, so Plugin Check and the PR artifacts see the same files.
  4. Detect jobs check out full history without file contents in place of git fetch --unshallow, which pulled every old version of those zips and took up to 47 seconds.

If a future runner image drops a library Chromium needs, the E2E job will fail at browser launch, and adding the package or restoring --with-deps fixes it. A plugin job that turns out to need an example zip would also fail until the sparse pattern changes.

These workflows only run on plugin changes, so this PR doesn't trigger them. #860 is a throwaway PR that runs them with these changes for timing.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with analyzing GitHub Actions run history and making the workflow changes.

The runner image already has Chromium's libraries, and the --with-deps apt step hung for 10 to 40 minutes on 8 of 36 recent E2E jobs when the Ubuntu mirror was slow.
The runner is thrown away after the job, so stopping the containers only cost 13 seconds.
The 14 wp-env/uploads.zip files are 590 MB of the 670 MB tree, and only the example sites use them. Plugins with an examples/ folder already leave it out of their archive, so the packages don't change.
git fetch --unshallow pulled every old version of the example zips and took up to 47 seconds. Detect jobs now check out full history without file contents and diff with --no-renames, so git never needs the blobs.
@josephfusco
josephfusco force-pushed the ci/faster-plugin-checks branch from d753f15 to 13c867b Compare October 27, 2026 15:27
@josephfusco

Copy link
Copy Markdown
Member Author

Timing from #860, which ran these changes on an hwp-previews comment edit, compared with the last 5 days of hwp-previews PR runs (median).

Workflow Before After
End-to-End Tests 294s 238s, 235s on rerun
Testing Integration 202s 152s
Plugin Check 176s 140s
Code Quality 86s 59s
Plugin Artifact for PR 77s 33s
E2E step Before After
Detect job 26s 6s
Checkout 11s 6s, 4s
Install Playwright browsers 46s (max 611s) 7s, 11s
Stop wp-env 13s removed

The steps this PR touches went from about 96s to about 20s. E2E only dropped about 57s because Start wp-env (95s, 83s) and the tests (90s, 100s) ran slower than their usual 70s and 82s in both runs, and this PR doesn't change either step. Two runs can't show the tail, but the apt download behind every 10 to 44 minute run no longer happens.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved issues remain, and the reported timing run in PR #860 successfully exercised all five modified workflows.

No open issues 🎉

What changed in this PR

This PR reduces plugin CI runtime by avoiding large example uploads, redundant history downloads, and unnecessary E2E setup and cleanup.

Changes:

  • Configure sparse, blobless checkouts across five plugin workflows, with full history for plugin detection.
  • Remove redundant history fetching and disable rename detection in get_plugin_slug.sh.
  • Skip Playwright system dependency installation and remove the final wp-env stop step.
File Description
.github/​workflows/​plugin-check.yml Optimize checkouts for plugin detection and validation.
.github/​workflows/​plugin-artifact-for-pr.yml Optimize checkouts for plugin detection and artifact creation.
.github/​workflows/​e2e-test.yml Optimize checkouts and reduce browser setup and environment cleanup.
.github/​workflows/​codeception.yml Optimize checkouts for plugin detection and Codeception tests.
.github/​workflows/​code-quality.yml Optimize checkouts for plugin detection and quality checks.
.github/​scripts/​get_plugin_slug.sh Use checkout-provided history and avoid fetching blobs for rename detection.

Review effort: Balanced

@josephfusco
josephfusco merged commit 533de8f into main Oct 27, 2026
4 checks passed
@josephfusco
josephfusco deleted the ci/faster-plugin-checks branch October 27, 2026 15:41
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