Skip to content

Commit

Permalink
Added phpstan in CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
sasezaki committed Jun 14, 2020
1 parent 6fc71fe commit 8c3240d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@ matrix:
- CS_CHECK=true
- BENCHMARKS=true
- TEST_COVERAGE=true
- STATIC_ANALYSIS=true
- php: 7.4
env:
- DEPS=lowest
Expand All @@ -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
Expand Down

0 comments on commit 8c3240d

Please sign in to comment.