Skip to content

Commit

Permalink
PT-1568: Fix pipeline checks for WooCommere/WordPress plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-pugach-mondu committed Jul 16, 2024
1 parent 56df502 commit 977c288
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/code_quality_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: composer require --dev phpmd/phpmd

- name: Run PHPMD
run: vendor/bin/phpmd path/to/your/plugin text cleancode,codesize,controversial,design,naming,unusedcode
run: ./vendor/bin/phpmd src ansi cleancode,codesize,controversial,design,naming,unusedcode

code_quality_phpstan:
runs-on: ubuntu-latest
Expand All @@ -42,13 +42,15 @@ jobs:
tools: composer

- name: Install dependencies
run: composer install
run: |
composer config --no-plugins allow-plugins.phpstan/extension-installer true
composer install
- name: Install PHPStan
run: composer require --dev phpstan/phpstan
run: composer require --dev szepeviktor/phpstan-wordpress phpstan/extension-installer

- name: Run PHPStan
run: vendor/bin/phpstan analyse path/to/your/plugin --level=max
run: vendor/bin/phpstan analyse src --level=max

code_quality_phpcs:
runs-on: ubuntu-latest
Expand All @@ -63,6 +65,9 @@ jobs:
php-version: '8.1'
tools: composer

- name: Allow dealerdirect plugin
run: composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true

- name: Install PHPCS
run: |
composer global require "squizlabs/php_codesniffer=*"
Expand All @@ -72,4 +77,4 @@ jobs:
run: echo "$HOME/.composer/vendor/bin" >> $GITHUB_PATH

- name: Run PHPCS
run: phpcs --standard=WordPress
run: phpcs --standard=./pbs-rules-set.xml

0 comments on commit 977c288

Please sign in to comment.