Run PHPstan during travis.

This commit is contained in:
Jan Böhmer 2020-02-01 18:56:31 +01:00
parent dd1f806c4e
commit a9293b7ceb
2 changed files with 9 additions and 1 deletions

View file

@ -26,6 +26,10 @@ install:
- php bin/console --env test doctrine:fixtures:load -n
- mysql -e "SET GLOBAL FOREIGN_KEY_CHECKS=1;"
before_script:
# Disable Xdebug on non coverage builds
- if [[ $(phpenv version-name) != '7.2' ]]; then phpenv config-rm xdebug.ini ; fi
script:
# Only run code coverage on PHP 7.2 to improve performance (code coverage is slower than normal testing)
- if [[ $(phpenv version-name) == '7.2' ]]; then php bin/phpunit --coverage-clover=coverage.xml ; fi
@ -40,6 +44,9 @@ script:
# Check doctrine mapping
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
# Static analysis
- composer phpstan
after_success:
- if [[ $(phpenv version-name) == '7.2' ]]; then bash <(curl -s https://codecov.io/bash) ; fi
matrix:

View file

@ -110,7 +110,8 @@
],
"post-update-cmd": [
"@auto-scripts"
]
],
"phpstan": "vendor/bin/phpstan analyse src --level 2 --memory-limit 1GB"
},
"conflict": {
"symfony/symfony": "*"