Files
yii2-usuario/.travis.yml
2018-07-13 10:16:43 +02:00

63 lines
1.8 KiB
YAML

# faster builds on new travis setup not using sudo
sudo: false
language: php
php:
- 5.6
- 7.0
- 7.1
- nightly
matrix:
fast_finish: true
allow_failures:
- php: nightly
# cache vendor dirs
# cache:
# directories:
# - vendor
# - $HOME/.composer/cache
install:
- |
if [[ $TRAVIS_PHP_VERSION != '7.1' && $TRAVIS_PHP_VERSION != hhv* ]]; then
# disable xdebug for performance reasons when code coverage is not needed
# note: xdebug on hhvm is disabled by default
phpenv config-rm xdebug.ini || echo "xdebug is not installed"
fi
- travis_retry composer self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:^1.4.0"
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --prefer-dist --no-interaction
before_script:
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- php -r "echo INTL_ICU_VERSION . \"\n\";"
- php -r "echo INTL_ICU_DATA_VERSION . \"\n\";"
- mysql --version
# initialize database
- mysql -e 'CREATE DATABASE `yii2-usuario-test`;';
- php tests/_app/yii.php migrate/up --interactive=0
- php tests/_app/yii.php migrate/up --interactive=0 --migrationPath=@yii/rbac/migrations
# enable code coverage on PHP 7.1, only one PHP version needs to generate coverage data
- |
if [ $TRAVIS_PHP_VERSION = '7.1' ]; then
CODECEPTION_FLAGS="--coverage-xml"
fi
script:
- composer validate --no-check-lock
- vendor/bin/codecept run $CODECEPTION_FLAGS
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '7.1' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml
fi