Skip to content

Commit

Permalink
enable phpcs and phpstan on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Aug 19, 2019
1 parent 9e2b1cf commit c63103f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- memcached

before_script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
- (echo yes | pecl install -f memcache; true)
- (composer self-update; true)
- if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then composer require php-coveralls/php-coveralls ^2.1; fi
- composer require doctrine/cache ~1.2
Expand All @@ -22,6 +22,8 @@ before_script:
script:
- mkdir -p build/logs
- ./vendor/phpunit/phpunit/phpunit --coverage-clover build/logs/clover.xml
- if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then vendor/bin/phpstan analyse -c phpstan.neon . --no-interaction --no-progress; fi
- if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then vendor/bin/phpcs --standard=phpcs.xml .; fi

after_success:
- if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then travis_retry php vendor/bin/php-coveralls -v; fi
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ parameters:
- %rootDir%/../../../autoload.php
ignoreErrors:
- '#.+Doctrine\\Common\\Cache\\CacheProvider.+#'
reportUnmatchedIgnoredErrors: false

0 comments on commit c63103f

Please sign in to comment.