scrutinizer wip

This commit is contained in:
resurtm
2016-12-21 01:59:50 +06:00
parent dfe799c1f8
commit 3530a3cc21

View File

@ -10,9 +10,6 @@ php:
- 7.1 - 7.1
- nightly - nightly
services:
- mysql
matrix: matrix:
fast_finish: true fast_finish: true
allow_failures: allow_failures:
@ -25,6 +22,12 @@ cache:
- $HOME/.composer/cache - $HOME/.composer/cache
install: 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 self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:^1.2.0" --no-plugins - travis_retry composer global require "fxp/composer-asset-plugin:^1.2.0" --no-plugins
- export PATH="$HOME/.composer/vendor/bin:$PATH" - export PATH="$HOME/.composer/vendor/bin:$PATH"
@ -39,14 +42,23 @@ before_script:
- mysql -e 'CREATE DATABASE `yii2-usuario-test`;'; - 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
# 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: script:
- composer validate --no-check-lock - composer validate --no-check-lock
- vendor/bin/codecept run --coverage --coverage-xml --coverage-html - vendor/bin/codecept run $CODECEPTION_FLAGS
notifications: notifications:
email: email:
- resurtm+travis-ci@gmail.com - resurtm+travis-ci@gmail.com
after_script: after_script:
- travis_retry wget https://scrutinizer-ci.com/ocular.phar - |
- php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml 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