From b7653c9ee8ff3ad28dbac08b6dc4d244d686eb5f Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:27:37 -0400 Subject: [PATCH 1/4] ci(e2e): install Playwright's Chromium without apt 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. --- .github/workflows/e2e-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index fb25003a..b7d0bd37 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -104,8 +104,10 @@ jobs: composer-options: '--no-progress --optimize-autoloader --no-dev' - name: Install playwright browsers - # Use the locked @playwright/test, and only Chromium since that's all the config runs - run: pnpm exec playwright install --with-deps chromium + # Use the locked @playwright/test, and only Chromium since that's all the config runs. + # Skip --with-deps because the runner image has Chromium's libraries and its apt + # step has hung for up to 40 minutes. + run: pnpm exec playwright install chromium working-directory: plugins/${{ env.PLUGIN }} - name: Start wp-env From ce22c932555622b9283f0af83694fe50d4769703 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:27:37 -0400 Subject: [PATCH 2/4] ci(e2e): drop the Stop wp-env step The runner is thrown away after the job, so stopping the containers only cost 13 seconds. --- .github/workflows/e2e-test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index b7d0bd37..ea63374b 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -118,7 +118,3 @@ jobs: - name: Run Playwright tests run: pnpm test:e2e working-directory: plugins/${{ env.PLUGIN }} - - - name: Stop wp-env - run: pnpm wp-env stop - working-directory: plugins/${{ env.PLUGIN }} From fab8cc62641c6713b752a9df398f237f1a7b9e0a Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:27:38 -0400 Subject: [PATCH 3/4] ci: skip the example uploads.zip files in plugin job checkouts 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. --- .github/workflows/code-quality.yml | 7 +++++++ .github/workflows/codeception.yml | 7 +++++++ .github/workflows/e2e-test.yml | 7 +++++++ .github/workflows/plugin-artifact-for-pr.yml | 7 +++++++ .github/workflows/plugin-check.yml | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index ddcd46e2..e9db7a00 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -83,6 +83,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: PHP Code Quality for ${{ matrix.plugin }} uses: ./.github/actions/code-quality diff --git a/.github/workflows/codeception.yml b/.github/workflows/codeception.yml index 4ed93c04..a619c54f 100644 --- a/.github/workflows/codeception.yml +++ b/.github/workflows/codeception.yml @@ -88,6 +88,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: ${{ matrix.plugin }} codeception tests uses: ./.github/actions/codeception with: diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index ea63374b..b327b128 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -82,6 +82,13 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Setup Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 227fea6d..a01d8ca2 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,6 +39,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Create plugin artifact for ${{ matrix.plugin }} uses: ./.github/actions/create-plugin-artifact diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index ec9f00e8..8dd2204d 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -74,6 +74,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Setup PHP and install production dependencies uses: ./.github/actions/setup-php-composer From 13c867b8849e2dd2e268228848ff769703a81a31 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:27:38 -0400 Subject: [PATCH 4/4] ci: give detect jobs blobless history instead of unshallowing 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. --- .github/scripts/get_plugin_slug.sh | 7 ++++--- .github/workflows/code-quality.yml | 9 +++++++++ .github/workflows/codeception.yml | 9 +++++++++ .github/workflows/e2e-test.yml | 9 +++++++++ .github/workflows/plugin-artifact-for-pr.yml | 9 +++++++++ .github/workflows/plugin-check.yml | 9 +++++++++ 6 files changed, 49 insertions(+), 3 deletions(-) diff --git a/.github/scripts/get_plugin_slug.sh b/.github/scripts/get_plugin_slug.sh index 2035c0f1..3244bd4a 100644 --- a/.github/scripts/get_plugin_slug.sh +++ b/.github/scripts/get_plugin_slug.sh @@ -5,13 +5,14 @@ set -e BASE_SHA="$1" HEAD_SHA="$2" -git fetch --prune --unshallow 2>/dev/null || git fetch --prune +# The checkout's blobless history covers this diff, and --no-renames stops git from +# fetching blobs to detect renames. # Get changed files in plugins subdirectories if [ "$BASE_SHA" = "main" ]; then - CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD | grep '^plugins/[^/]\+/' || true) + CHANGED_FILES=$(git diff --no-renames --name-only HEAD~1 HEAD | grep '^plugins/[^/]\+/' || true) else - CHANGED_FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep '^plugins/[^/]\+/' || true) + CHANGED_FILES=$(git diff --no-renames --name-only "$BASE_SHA" "$HEAD_SHA" | grep '^plugins/[^/]\+/' || true) fi if [ -z "$CHANGED_FILES" ]; then diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index e9db7a00..98485eb5 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -28,6 +28,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # get_plugin_slug.sh diffs against history, so fetch all of it without file contents. + fetch-depth: 0 + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Get changed plugin directory id: plugin diff --git a/.github/workflows/codeception.yml b/.github/workflows/codeception.yml index a619c54f..65a30721 100644 --- a/.github/workflows/codeception.yml +++ b/.github/workflows/codeception.yml @@ -34,6 +34,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # get_plugin_slug.sh diffs against history, so fetch all of it without file contents. + fetch-depth: 0 + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Get changed plugin directory id: plugin diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index b327b128..3c3a689b 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -36,6 +36,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # get_plugin_slug.sh diffs against history, so fetch all of it without file contents. + fetch-depth: 0 + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Get changed plugin directory id: plugin diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index a01d8ca2..e770bbf1 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -18,6 +18,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # get_plugin_slug.sh diffs against history, so fetch all of it without file contents. + fetch-depth: 0 + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Get changed plugin directories id: plugin diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 8dd2204d..94fa121a 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -32,6 +32,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + # get_plugin_slug.sh diffs against history, so fetch all of it without file contents. + fetch-depth: 0 + # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + /* + !**/wp-env/uploads.zip - name: Get changed plugin directories id: plugin