rector/.travis.yml
2018-08-06 12:35:26 +02:00

56 lines
1.4 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"
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 generate-rector-overview >> rector-overview.md
fi
after_script:
# upload coverage.xml to Coveralls
# - |
# if [[ $PHPUNIT_FLAGS != "" ]]; then
# wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar;
# php php-coveralls.phar --verbose;
# fi
# split monorepo to packages - only on merge to master + publish prefixed version
- |
if [[ $TRAVIS_EVENT_TYPE == "push" && $MONOREPO_SPLIT == true && $TRAVIS_BRANCH == "master" ]]; then
vendor/bin/monorepo-builder split -v
composer publish-prefixed
fi
cache:
directories:
- $HOME/.composer/cache
notifications:
email: never