Skip to content

Use plugin-check GitHub workflow in favor of brittle plugin-check PHPCS checks #1

Use plugin-check GitHub workflow in favor of brittle plugin-check PHPCS checks

Use plugin-check GitHub workflow in favor of brittle plugin-check PHPCS checks #1

Workflow file for this run

name: Plugin Check
on:
workflow_dispatch:
push:
branches:
- develop
- trunk
pull_request:
types:
- opened
- synchronize
- ready_for_review
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}
jobs:
plugin-check:
name: PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }}
runs-on: 'ubuntu-24.04'
permissions:
contents: read
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
php:
- '8.3' # Currently the wordpress/plugin-check-action always uses the latest PHP version anyway.
wordpress: ['latest'] # Currently the wordpress/plugin-check-action only supports 'latest' or 'trunk'.
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install Composer dependencies
run: composer install
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
- name: npm install
run: npm ci
- name: Build assets
run: npm run build
- name: Run plugin check
uses: wordpress/plugin-check-action@v1
with:
wp-version: ${{ matrix.wordpress }}
# Exclude file_type because of the dev files present in the repository.
exclude-checks: |
file_type
exclude-directories: |
.github
docs
tests