Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Added phpstan in travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvargiu committed Dec 18, 2018
1 parent fa915d9 commit 57829d3
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 782 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="php-coveralls/php-coveralls"
- STATIC_ANALYSIS_DEPS="phpstan/phpstan"

matrix:
include:
Expand All @@ -22,7 +23,7 @@ matrix:
- CS_CHECK=true
- BENCHMARKS=true
- TEST_COVERAGE=true
- PHPSTAN_TEST=true
- STATIC_ANALYSIS=true
- php: 7.1
env:
- DEPS=latest
Expand All @@ -44,13 +45,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 [[ $PHPSTAN_TEST == 'true' ]]; then ./vendor/bin/phpstan analyse --no-progress . ; 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
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"mikey179/vfsStream": "^1.6.4",
"ocramius/proxy-manager": "^2.1.1",
"phpbench/phpbench": "^0.13.0",
"phpstan/phpstan": "^0.10.3",
"phpunit/phpunit": "^6.4.4",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-container-config-test": "^0.2.1"
Expand Down
Loading

0 comments on commit 57829d3

Please sign in to comment.