Run phpstan in Travis
This commit is contained in:
parent
5dca09c0cb
commit
100d5846d1
2 changed files with 22 additions and 2 deletions
18
.travis.yml
18
.travis.yml
|
@ -11,10 +11,23 @@ matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
global:
|
||||||
|
- RUN_PHPSTAN="FALSE"
|
||||||
matrix:
|
matrix:
|
||||||
- PREFER_LOWEST=""
|
- PREFER_LOWEST=""
|
||||||
- PREFER_LOWEST="--prefer-lowest"
|
- PREFER_LOWEST="--prefer-lowest"
|
||||||
|
|
||||||
|
install:
|
||||||
|
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer require --dev phpstan/phpstan:^0.12; fi
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: 'PHPStan'
|
||||||
|
php: 7.4
|
||||||
|
env:
|
||||||
|
- RUN_PHPSTAN="TRUE"
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
|
@ -27,8 +40,9 @@ before_script:
|
||||||
- composer update $PREFER_LOWEST
|
- composer update $PREFER_LOWEST
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- find Core -name "*.php" | xargs -n1 php -l
|
- if [ $RUN_PHPSTAN == "FALSE" ]; then find Core -name "*.php" | xargs -n1 php -l; fi
|
||||||
- ./vendor/bin/sabre-cs-fixer fix . --dry-run --diff
|
- if [ $RUN_PHPSTAN == "FALSE" ]; then ./vendor/bin/sabre-cs-fixer fix . --dry-run --diff; fi
|
||||||
|
- if [ $RUN_PHPSTAN == "TRUE" ]; then php vendor/bin/phpstan.phar analyse Core html; fi
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
|
6
phpstan.neon
Normal file
6
phpstan.neon
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
parameters:
|
||||||
|
level: 0
|
||||||
|
excludes_analyse:
|
||||||
|
- Core/Frameworks/BaikalAdmin/Resources/GlyphiconsPro/generate-sprite.php
|
||||||
|
- Core/Resources/Web/BaikalAdmin/GlyphiconsPro/generate-sprite.php
|
||||||
|
- html/res/core/BaikalAdmin/GlyphiconsPro/generate-sprite.php
|
Loading…
Reference in a new issue