diff --git a/.github/workflows/plugin-check-main.yml b/.github/workflows/plugin-check-main.yml new file mode 100644 index 0000000..7841769 --- /dev/null +++ b/.github/workflows/plugin-check-main.yml @@ -0,0 +1,35 @@ +name: WordPress Plugin Check (Main) + +on: + push: + branches: [ main ] + +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'