2017-07-15 19:12:04 +02:00
|
|
|
language: php
|
|
|
|
|
2017-11-06 03:51:04 +01:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- php: 7.1
|
2018-07-06 18:11:57 +02:00
|
|
|
env: STATIC_ANALYSIS=true RUN_RECTOR=true MONOREPO_SPLIT=true
|
2018-05-30 20:11:05 +02:00
|
|
|
- php: 7.1
|
|
|
|
env: COMPOSER_FLAGS="--prefer-lowest"
|
2018-01-04 15:22:59 +01:00
|
|
|
- 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"
|
2017-12-22 02:50:17 +01:00
|
|
|
- php: 7.2
|
2018-01-04 15:22:59 +01:00
|
|
|
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml --testsuite=main"
|
2017-07-15 19:12:04 +02:00
|
|
|
|
|
|
|
install:
|
2018-05-30 20:11:05 +02:00
|
|
|
- composer update $COMPOSER_FLAGS
|
2017-07-15 19:12:04 +02:00
|
|
|
|
2017-11-06 03:51:04 +01:00
|
|
|
before_script:
|
|
|
|
# disable xdebug if not coverage
|
2018-07-12 01:11:23 +02:00
|
|
|
- if [[ $PHPUNIT_FLAGS == "" ]]; then phpenv config-rm xdebug.ini; fi
|
2017-11-06 03:51:04 +01:00
|
|
|
|
2017-07-15 19:12:04 +02:00
|
|
|
script:
|
2017-11-06 03:51:04 +01:00
|
|
|
- vendor/bin/phpunit $PHPUNIT_FLAGS
|
|
|
|
# disable xdebug
|
2017-11-05 22:21:50 +01:00
|
|
|
- phpenv config-rm xdebug.ini || return 0
|
2018-07-12 01:11:23 +02:00
|
|
|
- |
|
|
|
|
if [[ $STATIC_ANALYSIS == true ]]; then
|
2018-07-12 01:12:45 +02:00
|
|
|
composer check-cs
|
|
|
|
composer phpstan
|
2018-07-12 01:11:23 +02:00
|
|
|
fi
|
2018-03-03 10:09:46 +01:00
|
|
|
# Rector demo run
|
2018-07-12 01:12:45 +02:00
|
|
|
- |
|
|
|
|
if [[ $RUN_RECTOR == true ]]; then
|
|
|
|
bin/rector process src tests --level symfony40 --dry-run
|
|
|
|
bin/rector describe --level all
|
|
|
|
fi
|
2017-10-29 23:26:15 +01:00
|
|
|
|
2017-11-05 22:21:50 +01:00
|
|
|
after_script:
|
|
|
|
# upload coverage to Coveralls.io
|
2017-11-06 03:51:04 +01:00
|
|
|
- |
|
2018-05-30 19:30:25 +02:00
|
|
|
if [[ $PHPUNIT_FLAGS == true ]]; then
|
2017-11-06 03:51:04 +01:00
|
|
|
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
|
|
|
|
php coveralls.phar --verbose
|
|
|
|
fi
|
2017-10-29 23:26:15 +01:00
|
|
|
|
2018-07-12 01:12:45 +02:00
|
|
|
# split monorepo to packages - only on merge to master
|
2018-07-06 18:11:57 +02:00
|
|
|
- |
|
2018-07-12 01:12:45 +02:00
|
|
|
if [[ $TRAVIS_EVENT_TYPE == "push" && $MONOREPO_SPLIT == true && $TRAVIS_BRANCH == "master" ]]; then
|
2018-07-06 18:11:57 +02:00
|
|
|
vendor/bin/monorepo-builder split -v
|
|
|
|
fi
|
|
|
|
|
2017-11-05 22:23:02 +01:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
2017-07-15 19:12:04 +02:00
|
|
|
notifications:
|
2017-08-07 15:53:52 +02:00
|
|
|
email: never
|