Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/plugin-check-main.yml
Original file line number Diff line number Diff line change
@@ -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'
49 changes: 1 addition & 48 deletions .github/workflows/plugin-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'