@@ -22,18 +22,17 @@ jobs:
2222 mysql-version : ' 5.6'
2323 - name : Check out repository code
2424 uses : actions/checkout@v3
25- - name : Setup CakePHP
26- uses : ./.github/actions/setup-cakephp
27- - name : Setup database
28- uses : ./.github/actions/setup-database
29- - name : Install PHPUnit
25+ - name : Install Dependencies
3026 run : |
31- cd ./cakephp
32- composer require 'phpunit/phpunit=5.7'
33- cd ../
27+ composer remove --dev phpstan/phpstan cakephp/cakephp-codesniffer overtrue/phplint --no-update
28+ composer require 'cakephp/cakephp=3.10.5' 'phpunit/phpunit=5.7.0' --with-all-dependencies
29+ shell : bash
30+ - name : Create test database
31+ run : mysql -u root -e "CREATE DATABASE cakephp_test"
32+ shell : bash
3433
3534 - name : Unit Tests
36- run : ./cakephp/lib/Cake/Console/cake test Filter All --stderr -app ./cakephp/app
35+ run : ./vendor/bin/phpunit ./tests
3736
3837 PHP-Lint :
3938 runs-on : ubuntu-latest
@@ -58,13 +57,24 @@ jobs:
5857 php-version : 7.4
5958 - name : Check out repository code
6059 uses : actions/checkout@v3
61- - name : Setup CakePHP
62- uses : ./.github/actions/setup-cakephp
63- - name : Install PHPUnit
64- run : composer require 'phpunit/phpunit=7.0'
65- - name : Install PHPStan
66- run : |
67- composer require --dev phpstan/phpstan
68- composer require --dev phpstan/phpstan-phpunit
60+ - name : Install Dependencies
61+ run : composer require 'cakephp/cakephp=3.10.5' 'phpunit/phpunit=7.0' phpstan/phpstan phpstan/phpstan-phpunit --with-all-dependencies
6962 - name : PHPStan
70- run : vendor/bin/phpstan analyse --level=8 ./cakephp/plugins/Filter
63+ run : vendor/bin/phpstan analyse --level=8 ./src ./tests
64+
65+ PHP-Code-Sniffer :
66+ runs-on : ubuntu-latest
67+ steps :
68+ - name : Setup PHP
69+ uses : shivammathur/setup-php@v2
70+ with :
71+ php-version : 5.6
72+ - name : Check out repository code
73+ uses : actions/checkout@v3
74+ - name : Install PHPCS
75+ run : |
76+ composer remove --dev phpstan/phpstan phpunit/phpunit overtrue/phplint --no-update
77+ composer require cakephp/cakephp-codesniffer
78+ vendor/bin/phpcs --config-set installed_paths /home/runner/work/cakephp-filter-plugin/cakephp-filter-plugin/vendor/cakephp/cakephp-codesniffer
79+ - name : Run PHPCS
80+ run : vendor/bin/phpcs --colors --parallel=16 -p --standard=CakePHP --extensions=php,ctp src/ tests/
0 commit comments