mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 18:50:14 +02:00
Require "phpstan/phpstan" for development and add to the Travis CI configuration file to execute the analysis when Travis executes the build with the version 7.2 of PHP. The level of the configuration is very week for now (just "1") and still quite some changes had to be made in order to make the analysis pass. I hope it does not take much time to increase the level of the strictness of the analyses. I tried to configure that before but because of dependencies with "symfony/validator" it was not possible. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
sudo: false
|
|
|
|
language: php
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|
|
- $HOME/.php-cs-fixer
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.1
|
|
env: COMPOSER_ARGUMENTS="--prefer-lowest --prefer-stable"
|
|
- php: 7.1
|
|
- php: 7.2
|
|
- php: nightly
|
|
env: COMPOSER_ARGUMENTS="--ignore-platform-reqs"
|
|
allow_failures:
|
|
- php: nightly
|
|
fast_finish: true
|
|
|
|
before_script:
|
|
- pecl install uopz || echo "Cound not install uopz" 1>&2
|
|
- composer update --prefer-dist ${COMPOSER_ARGUMENTS}
|
|
|
|
script:
|
|
- vendor/bin/phpunit --configuration phpunit.xml.dist --colors --coverage-clover=coverage.clover
|
|
- |
|
|
if [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then
|
|
vendor/bin/docheader check library tests
|
|
fi
|
|
- |
|
|
if [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then
|
|
vendor/bin/php-cs-fixer --diff --dry-run --verbose fix
|
|
fi
|
|
- |
|
|
if [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then
|
|
vendor/bin/phpstan analyze
|
|
fi
|
|
|
|
after_script:
|
|
- |
|
|
if [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then
|
|
wget https://scrutinizer-ci.com/ocular.phar
|
|
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
|
|
fi
|