Skip to content

Commit 877ef26

Browse files
authored
Workflows
1 parent 3374511 commit 877ef26

2 files changed

Lines changed: 71 additions & 2 deletions

File tree

.github/workflows/wp-compatibility-test.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: WordPress Compatibility Test
1+
name: WordPress Compatibility & Plugin Check
22

33
on:
44
# Run on pushes to main branch and on all pull requests
@@ -319,3 +319,72 @@ jobs:
319319
run: |
320320
echo "::error::PHP ${{ matrix.php-version }} compatibility test failed. Created issue for tracking."
321321
exit 1
322+
323+
plugin-check:
324+
name: WordPress Plugin Check (PHP ${{ matrix.php-version }})
325+
runs-on: ubuntu-latest
326+
327+
strategy:
328+
fail-fast: false
329+
matrix:
330+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
331+
332+
steps:
333+
- name: Checkout code
334+
uses: actions/checkout@v4
335+
336+
- name: Setup PHP ${{ matrix.php-version }}
337+
uses: shivammathur/setup-php@v2
338+
with:
339+
php-version: ${{ matrix.php-version }}
340+
extensions: mysqli, curl, zip, intl, gd, mbstring, fileinfo, xml
341+
coverage: none
342+
tools: composer:v2
343+
344+
- name: Install Composer dependencies
345+
uses: ramsey/composer-install@v3
346+
with:
347+
dependency-versions: highest
348+
composer-options: "--prefer-dist --no-progress"
349+
350+
- name: WordPress Plugin Check
351+
uses: WordPress/plugin-check-action@v1.1.2
352+
with:
353+
# Build directory - using repository root
354+
build-dir: './'
355+
356+
# Configure which categories to check
357+
categories: |
358+
accessibility
359+
general
360+
performance
361+
plugin_repo
362+
security
363+
364+
# Whether to include experimental checks
365+
include-experimental: false
366+
367+
# Don't ignore warnings or errors
368+
ignore-warnings: false
369+
ignore-errors: false
370+
371+
# WordPress version to use
372+
wp-version: 'latest'
373+
374+
- name: Create issue on plugin check failure
375+
if: ${{ failure() }}
376+
uses: JasonEtco/create-an-issue@v2
377+
env:
378+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
379+
RUN_ID: ${{ github.run_id }}
380+
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
381+
PHP_VERSION: ${{ matrix.php-version }}
382+
with:
383+
filename: .github/ISSUE_TEMPLATE/plugin-check-failure.md
384+
update_existing: false
385+
386+
- name: Mark job as failed after issue creation
387+
if: ${{ failure() }}
388+
run: |
389+
echo "::error::WordPress Plugin Check failed. Created issue for tracking."
390+
exit 1

.github/workflows/wp-plugin-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
27+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
2828

2929
steps:
3030
- name: Checkout code

0 commit comments

Comments
 (0)