From b9b47c7a42ff3c488ab9d6154ab746faca613a6d Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 10:45:11 -0400 Subject: [PATCH 1/3] ci: run Plugin Check on the built plugin archive instead of the source tree --- .github/workflows/plugin-check.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 159b9420..0781f3a0 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -70,14 +70,32 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup PHP and install production dependencies + uses: ./.github/actions/setup-php-composer + with: + php-version: '8.2' # Note: All plugins are compatible with PHP 8.2 + working-directory: plugins/${{ matrix.plugin }} + composer-options: '--no-progress --optimize-autoloader --no-dev' + + # Check what ships, not the source tree. composer archive applies the plugin's + # archive.exclude list, the same as release-plugin.yml. + - name: Build plugin archive + working-directory: plugins/${{ matrix.plugin }} + env: + SLUG: ${{ matrix.plugin }} + run: | + composer archive --format=zip --file="plugin-build/$SLUG" --dir="." + unzip -q "plugin-build/$SLUG.zip" -d "$RUNNER_TEMP/plugin-check/$SLUG" + - name: Run Plugin Check uses: wordpress/plugin-check-action@v1 with: - build-dir: plugins/${{ matrix.plugin }} + build-dir: ${{ runner.temp }}/plugin-check/${{ matrix.plugin }} exclude-directories: | - .git vendor - node_modules - tests + # The plugins ship through GitHub Releases and Composer, not WordPress.org, + # so the Update URI header is intentional. + ignore-codes: | + plugin_updater_detected ignore-warnings: true include-experimental: false From 210af707def78e6d91aeef6dde779406ed4dc232 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 10:45:11 -0400 Subject: [PATCH 2/3] chore(logging): keep .gitkeep placeholders out of the plugin zip --- plugins/wpgraphql-logging/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/wpgraphql-logging/composer.json b/plugins/wpgraphql-logging/composer.json index 4f717be2..71d333c5 100644 --- a/plugins/wpgraphql-logging/composer.json +++ b/plugins/wpgraphql-logging/composer.json @@ -81,6 +81,7 @@ "name": "wpgraphql-logging", "exclude": [ "/.*", + ".gitkeep", "/build-sha.txt", "/docs", "/TESTING.md", From f165dc22f9587f3d0af6e5c6ce1f2d7e67b148bf Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 11:03:55 -0400 Subject: [PATCH 3/3] ci: create the extraction folder before unzipping the plugin archive --- .github/workflows/plugin-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 0781f3a0..4506f010 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -85,6 +85,7 @@ jobs: SLUG: ${{ matrix.plugin }} run: | composer archive --format=zip --file="plugin-build/$SLUG" --dir="." + mkdir -p "$RUNNER_TEMP/plugin-check/$SLUG" unzip -q "plugin-build/$SLUG.zip" -d "$RUNNER_TEMP/plugin-check/$SLUG" - name: Run Plugin Check