rector/.travis.yml
2018-04-29 11:16:51 +02:00

46 lines
1.3 KiB
YAML

language: php
matrix:
include:
- php: 7.1
env: STATIC_ANALYSIS=true RUN_RECTOR=true
- php: 7.2
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml --testsuite=contrib-rectors"
- php: 7.2
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml --testsuite=general-rectors"
- php: 7.2
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml --testsuite=main"
install:
- composer install
before_script:
# disable xdebug if not coverage
- if [[ $PHPUNIT_FLAGS = "" ]]; then phpenv config-rm xdebug.ini; fi
script:
- vendor/bin/phpunit $PHPUNIT_FLAGS
# disable xdebug
- phpenv config-rm xdebug.ini || return 0
- if [[ $STATIC_ANALYSIS != "" ]]; then composer check-cs; fi
- if [[ $STATIC_ANALYSIS != "" ]]; then composer phpstan; fi
# Rector demo run
- if [[ $RUN_RECTOR != "" ]]; then bin/rector process src tests --level symfony40 --dry-run; fi
# Rector describe command
- if [[ $RUN_RECTOR != "" ]]; then bin/rector describe --level all; fi
after_script:
# upload coverage to Coveralls.io
- |
if [[ $PHPUNIT_FLAGS != "" ]]; then
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
php coveralls.phar --verbose
fi
cache:
directories:
- $HOME/.composer/cache
notifications:
email: never