Repository navigation
ci: speed up plugin workflows - #859
Conversation
92b2b82 to
d753f15
Compare
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.
d753f15 to
13c867b
Compare
|
Timing from #860, which ran these changes on an
The steps this PR touches went from about 96s to about 20s. E2E only dropped about 57s because |
There was a problem hiding this comment.
🟢 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 stopstep.
| 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
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:
--with-deps. Every slow run was apt downloading fromazure.archive.ubuntu.comat 44 to 129 kB/s, while the runner image already had Chromium's libraries.Stop wp-envstep is gone, since the runner is thrown away after the job anyway (13 seconds).wp-env/uploads.zipfiles, which are 590 MB of the 670 MB tree and only used by the example sites. Plugins with anexamples/folder already leave it out of their archive, so Plugin Check and the PR artifacts see the same files.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-depsfixes 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.