mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Run PHPstan during travis.
This commit is contained in:
parent
dd1f806c4e
commit
a9293b7ceb
2 changed files with 9 additions and 1 deletions
|
@ -26,6 +26,10 @@ install:
|
||||||
- php bin/console --env test doctrine:fixtures:load -n
|
- php bin/console --env test doctrine:fixtures:load -n
|
||||||
- mysql -e "SET GLOBAL FOREIGN_KEY_CHECKS=1;"
|
- 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:
|
script:
|
||||||
# Only run code coverage on PHP 7.2 to improve performance (code coverage is slower than normal testing)
|
# 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
|
- if [[ $(phpenv version-name) == '7.2' ]]; then php bin/phpunit --coverage-clover=coverage.xml ; fi
|
||||||
|
@ -40,6 +44,9 @@ script:
|
||||||
# Check doctrine mapping
|
# Check doctrine mapping
|
||||||
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
|
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
|
||||||
|
|
||||||
|
# Static analysis
|
||||||
|
- composer phpstan
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- if [[ $(phpenv version-name) == '7.2' ]]; then bash <(curl -s https://codecov.io/bash) ; fi
|
- if [[ $(phpenv version-name) == '7.2' ]]; then bash <(curl -s https://codecov.io/bash) ; fi
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
@ -110,7 +110,8 @@
|
||||||
],
|
],
|
||||||
"post-update-cmd": [
|
"post-update-cmd": [
|
||||||
"@auto-scripts"
|
"@auto-scripts"
|
||||||
]
|
],
|
||||||
|
"phpstan": "vendor/bin/phpstan analyse src --level 2 --memory-limit 1GB"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"symfony/symfony": "*"
|
"symfony/symfony": "*"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue