File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,11 @@ jobs:
3333 id : composer-cache
3434 run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3535
36- - name : Get date part for cache key
37- id : key-date
38- run : echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
39-
4036 - name : Cache composer dependencies
4137 uses : actions/cache@v4
4238 with :
4339 path : ${{ steps.composer-cache.outputs.dir }}
44- key : ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}
40+ key : ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
4541
4642 - name : composer install
4743 run : composer install --prefer-dist --no-progress
@@ -80,22 +76,20 @@ jobs:
8076 id : composer-cache
8177 run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8278
83- - name : Get date part for cache key
84- id : key-date
85- run : echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
86-
8779 - name : Cache composer dependencies
8880 uses : actions/cache@v4
8981 with :
9082 path : ${{ steps.composer-cache.outputs.dir }}
91- key : ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}
83+ key : ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
9284
9385 - name : composer install
9486 run : composer install --prefer-dist --no-progress
9587
88+ - name : Setup PHPStan
89+ run : composer stan-setup
90+
9691 - name : Run PHP CodeSniffer
9792 run : composer cs-check
9893
9994 - name : Run phpstan
100- if : success() || failure()
10195 run : composer stan
Original file line number Diff line number Diff line change 4343 }
4444 },
4545 "scripts" : {
46+ "check" : [
47+ " @cs-check" ,
48+ " @test"
49+ ],
4650 "cs-check" : " phpcs -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/" ,
4751 "cs-fix" : " phpcbf --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/" ,
4852 "test" : " phpunit" ,
49- "test:unit" : " phpunit --testsuite=Unit" ,
50- "test:integration" : " phpunit --testsuite=Integration" ,
5153 "test:coverage" : " phpunit --coverage-html coverage" ,
5254 "stan" : " phpstan analyse src/ tests/" ,
5355 "stan-setup" : " cp composer.json composer.backup && composer require --dev phpstan/phpstan:^2.0 && mv composer.backup composer.json" ,
You can’t perform that action at this time.
0 commit comments