Skip to content
This repository has been archived by the owner on Mar 17, 2019. It is now read-only.

Commit

Permalink
Added PHPStan checks to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Jul 22, 2017
1 parent e6e8d61 commit bd97fb1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ env:
global:
- PATH="$HOME/.composer/vendor/bin:$PATH"
- SYMFONY_DEPRECATIONS_HELPER=weak
- TARGET=test

matrix:
fast_finish: true
include:
- php: 7.1
env: TARGET=lint
- php: 7.1
env: TARGET=phpstan
- php: 7.1
env: COMPOSER_FLAGS="--prefer-lowest"
allow_failures:
Expand All @@ -28,14 +33,13 @@ before_install:

install:
- composer global require satooshi/php-coveralls sllh/composer-lint codeclimate/php-test-reporter --prefer-dist --no-interaction
- if [ "$TARGET" == "phpstan" ]; then composer require --dev phpstan/phpstan:^0.7 --no-update; fi
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

before_script:
- echo "zend_extension=xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

script:
- composer validate
- phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
script: make $TARGET

after_script:
- coveralls -v
Expand Down
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
all:
@echo "Please choose a task."

cs:
vendor/bin/php-cs-fixer fix --verbose
./vendor/bin/php-cs-fixer fix --verbose

cs_dry_run:
vendor/bin/php-cs-fixer fix --verbose --dry-run
./vendor/bin/php-cs-fixer fix --verbose --dry-run

lint:
composer validate

test:
vendor/bin/phpunit -c phpunit.xml.dist
./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml

phpstan:
./vendor/bin/phpstan analyse -c phpstan.neon -l 5 src tests
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
parameters:

0 comments on commit bd97fb1

Please sign in to comment.