From 8c3240d851633462f97145e521f9ab925c361f19 Mon Sep 17 00:00:00 2001 From: sasezaki Date: Sun, 14 Jun 2020 12:40:25 +0900 Subject: [PATCH] Added phpstan in CI build --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index e43a22cd..fb478b1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: global: - COMPOSER_ARGS="--no-interaction" - COVERAGE_DEPS="php-coveralls/php-coveralls" + - STATIC_ANALYSIS_DEPS="phpstan/phpstan" matrix: fast_finish: true @@ -21,6 +22,7 @@ matrix: - CS_CHECK=true - BENCHMARKS=true - TEST_COVERAGE=true + - STATIC_ANALYSIS=true - php: 7.4 env: - DEPS=lowest @@ -36,12 +38,14 @@ install: - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi + - if [[ $STATIC_ANALYSIS == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $STATIC_ANALYSIS_DEPS ; fi - stty cols 120 && composer show script: - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi - if [[ $BENCHMARKS == 'true' ]]; then vendor/bin/phpbench run --revs=2 --iterations=2 --report=aggregate ; fi - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi + - if [[ $STATIC_ANALYSIS == 'true' ]]; then ./vendor/bin/phpstan analyse --no-progress ; fi after_script: - if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi