You've already forked wc-composable-product
Upgrade to PHPUnit 10, add PHPCS with WPCS compliance, add phpcs CI job
All checks were successful
All checks were successful
- Upgrade PHPUnit 9.6 → 10, update phpunit.xml.dist schema - Add PHPCS 3.13 with WordPress-Extra + PHPCompatibilityWP standards - PHPCBF auto-fix + manual fixes for full WPCS compliance - Add phpcs job to release workflow (parallel with lint) - Pin composer platform to PHP 8.3 to prevent incompatible dep locks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,30 @@ jobs:
|
||||
find includes -name "*.php" -print0 | xargs -0 -n1 php -l
|
||||
find tests -name "*.php" -print0 | xargs -0 -n1 php -l
|
||||
|
||||
phpcs:
|
||||
name: PHP CodeSniffer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
extensions: mbstring, xml
|
||||
tools: composer:v2
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: |
|
||||
composer config platform.php 8.3.0
|
||||
composer install --optimize-autoloader --no-interaction
|
||||
|
||||
- name: Run PHPCS
|
||||
run: vendor/bin/phpcs
|
||||
|
||||
test:
|
||||
name: PHP Unit
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
steps:
|
||||
@@ -51,7 +74,7 @@ jobs:
|
||||
run: vendor/bin/phpunit --testdox
|
||||
|
||||
build-release:
|
||||
needs: test
|
||||
needs: [test, phpcs]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
Reference in New Issue
Block a user