mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 14:27:14 +01:00
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
language: php
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.1
|
|
env: STATIC_ANALYSIS=true RUN_RECTOR=true MONOREPO_SPLIT=true
|
|
- php: 7.1
|
|
env: COMPOSER_FLAGS="--prefer-lowest"
|
|
- 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 update $COMPOSER_FLAGS
|
|
|
|
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 == true ]]; then
|
|
composer check-cs
|
|
composer phpstan
|
|
fi
|
|
# Rector demo run
|
|
- |
|
|
if [[ $RUN_RECTOR == true ]]; then
|
|
bin/rector process src tests --level symfony40 --dry-run
|
|
bin/rector describe --level all
|
|
fi
|
|
|
|
after_script:
|
|
# upload coverage to Coveralls.io
|
|
- |
|
|
if [[ $PHPUNIT_FLAGS == true ]]; then
|
|
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
|
|
php coveralls.phar --verbose
|
|
fi
|
|
|
|
# split monorepo to packages - only on merge to master
|
|
- |
|
|
if [[ $TRAVIS_EVENT_TYPE == "push" && $MONOREPO_SPLIT == true && $TRAVIS_BRANCH == "master" ]]; then
|
|
vendor/bin/monorepo-builder split -v
|
|
fi
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|
|
|
|
notifications:
|
|
email: never
|