diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 159b9420..4506f010 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -70,14 +70,33 @@ 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="." + mkdir -p "$RUNNER_TEMP/plugin-check/$SLUG" + 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 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",