mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-20 15:08:11 +01:00
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
language: php
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.1
|
|
env: STATIC_ANALYSIS=true RUN_RECTOR=true
|
|
- php: 7.1
|
|
env: COMPOSER_FLAGS="--prefer-lowest"
|
|
- php: 7.2
|
|
env: COVERAGE=true
|
|
|
|
install:
|
|
- composer update $COMPOSER_FLAGS
|
|
|
|
before_script:
|
|
- if [[ $COVERAGE == "" ]]; then phpenv config-rm xdebug.ini; fi
|
|
|
|
script:
|
|
- vendor/bin/phpunit
|
|
# disable xdebug
|
|
- phpenv config-rm xdebug.ini || return 0
|
|
- |
|
|
if [[ $STATIC_ANALYSIS == true ]]; then
|
|
composer check-cs
|
|
composer phpstan
|
|
fi
|
|
|
|
# Rector demo run
|
|
- |
|
|
if [[ $RUN_RECTOR == true ]]; then
|
|
bin/rector process src --level symfony40 --dry-run
|
|
bin/rector generate-rector-overview >> rector-overview.md
|
|
fi
|
|
|
|
after_script:
|
|
# Coverage
|
|
- |
|
|
if [[ $COVERAGE == true && $TRAVIS_BRANCH == "master" ]]; then
|
|
vendor/bin/phpunit --coverage-clover coverage.xml
|
|
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
|
|
php php-coveralls.phar --verbose
|
|
fi
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|
|
|
|
notifications:
|
|
email: false
|