From 3e854c00bd23b7df5563383ebc02975f01638d1a Mon Sep 17 00:00:00 2001 From: Wan Zulkarnain Date: Mon, 17 Aug 2026 11:11:30 +0200 Subject: [PATCH 1/2] ci: run WordPress Plugin Check only on tags/releases --- .github/workflows/plugin-check-release.yml | 37 ++++++++++++++++ .github/workflows/plugin-check.yml | 49 +--------------------- 2 files changed, 38 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/plugin-check-release.yml diff --git a/.github/workflows/plugin-check-release.yml b/.github/workflows/plugin-check-release.yml new file mode 100644 index 0000000..59f8cef --- /dev/null +++ b/.github/workflows/plugin-check-release.yml @@ -0,0 +1,37 @@ +name: WordPress Plugin Check (Release) + +on: + push: + tags: [ '**' ] + release: + types: [ published ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + plugin-check: + name: Plugin Check + runs-on: ubuntu-latest + # TODO: Re-enable strict checking once upstream is fixed. + # Blocked by https://github.com/WordPress/plugin-check-action/issues/579 + # (wp-env silently fails to start on new ubuntu-24.04 runner images) + continue-on-error: true + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Prepare plugin folder for CI + run: | + mkdir -p ci-build/chip-for-gravity-forms + git archive HEAD | tar -x -C ci-build/chip-for-gravity-forms + # .wp-env.json is export-ignored but needed by plugin-check action to start wp-env. + cp .wp-env.json ci-build/chip-for-gravity-forms/ + + - name: Run Plugin Check + uses: wordpress/plugin-check-action@v1 + with: + build-dir: './ci-build/chip-for-gravity-forms' + exclude-directories: 'vendor,node_modules' diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index d71b3a1..ca4c7e1 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -11,30 +11,7 @@ concurrency: cancel-in-progress: true jobs: - # Tier 1: Build + PHP compatibility (run in parallel) - - build: - name: Build Plugin - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Prepare plugin folder for CI - run: | - mkdir -p ci-build/chip-for-gravity-forms - git archive HEAD | tar -x -C ci-build/chip-for-gravity-forms - # .wp-env.json is export-ignored but needed by plugin-check action to start wp-env. - cp .wp-env.json ci-build/chip-for-gravity-forms/ - echo "✅ Plugin folder prepared" - ls -la ci-build/chip-for-gravity-forms/ - - - name: Upload build artifact - uses: actions/upload-artifact@v7 - with: - name: chip-for-gravity-forms-build - path: ci-build/ - retention-days: 5 + # Tier 1: PHP compatibility (run in parallel) php-compatibility: name: PHP ${{ matrix.php-version }} Compatibility @@ -112,27 +89,3 @@ jobs: - name: Run PHPCS run: phpcs --standard=phpcs.xml . continue-on-error: false - - # Tier 3: Plugin Check (needs build artifact) - - plugin-check: - name: Plugin Check - runs-on: ubuntu-latest - needs: [build, php-compatibility, phpcs, phpunit] - # TODO: Re-enable strict checking once upstream is fixed. - # Blocked by https://github.com/WordPress/plugin-check-action/issues/579 - # (wp-env silently fails to start on new ubuntu-24.04 runner images) - continue-on-error: true - - steps: - - name: Download build artifact - uses: actions/download-artifact@v8 - with: - name: chip-for-gravity-forms-build - path: ./build - - - name: Run Plugin Check - uses: wordpress/plugin-check-action@v1 - with: - build-dir: './build/chip-for-gravity-forms' - exclude-directories: 'vendor,node_modules' From d5a62e7643464724d7cba9b7792a32ab3564111e Mon Sep 17 00:00:00 2001 From: Wan Zulkarnain Date: Mon, 17 Aug 2026 11:23:47 +0200 Subject: [PATCH 2/2] ci: run WordPress Plugin Check on push to main instead of tags/releases --- .../{plugin-check-release.yml => plugin-check-main.yml} | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) rename .github/workflows/{plugin-check-release.yml => plugin-check-main.yml} (91%) diff --git a/.github/workflows/plugin-check-release.yml b/.github/workflows/plugin-check-main.yml similarity index 91% rename from .github/workflows/plugin-check-release.yml rename to .github/workflows/plugin-check-main.yml index 59f8cef..7841769 100644 --- a/.github/workflows/plugin-check-release.yml +++ b/.github/workflows/plugin-check-main.yml @@ -1,10 +1,8 @@ -name: WordPress Plugin Check (Release) +name: WordPress Plugin Check (Main) on: push: - tags: [ '**' ] - release: - types: [ published ] + branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.ref }}