Move code coverage to Scrutinizer

This commit is contained in:
Claudio Sanches 2017-07-20 16:50:12 -03:00
parent 383c7eb889
commit 4251bd5614
5 changed files with 22 additions and 20 deletions

View File

@ -1,3 +0,0 @@
src_dir: .
coverage_clover: ./tmp/clover.xml
json_path: ./tmp/coveralls-upload.json

View File

@ -30,5 +30,24 @@ checks:
tools:
sensiolabs_security_checker: true
external_code_coverage:
timeout: 600 # Wait 10 minutes for Travis send coverage file.
build:
environment:
php: '7.1'
mysql: true
apache2:
modules: ['rewrite']
variables:
WP_VERSION: 'latest'
dependencies:
before:
- bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
tests:
override:
-
command: 'vendor/bin/phpunit --coverage-clover=results'
coverage:
file: 'results'
format: 'clover'

View File

@ -29,7 +29,7 @@ before_script:
- bash tests/bin/travis.sh before
script:
- bash tests/bin/phpunit.sh
- phpunit -c phpunit.xml.dist
after_script:
- bash tests/bin/travis.sh after

View File

@ -1,5 +0,0 @@
if [[ ${TRAVIS_BRANCH} == 'master' ]] && [[ ${TRAVIS_EVENT_TYPE} != 'pull_request' ]] && [[ ${TRAVIS_PHP_VERSION} == ${PHP_LATEST_STABLE} ]]; then
phpunit -c phpunit.xml.dist --coverage-clover ./tmp/clover.xml
else
phpunit -c phpunit.xml.dist
fi

View File

@ -15,13 +15,4 @@ if [ $1 == 'before' ]; then
composer global require "phpunit/phpunit=6.2.*"
fi
elif [ $1 == 'after' ]; then
# Only run on master, not pull requests, latest stable PHP box (defined in .travis.yml).
if [[ ${TRAVIS_BRANCH} == 'master' ]] && [[ ${TRAVIS_EVENT_TYPE} != 'pull_request' ]] && [[ ${TRAVIS_PHP_VERSION} == ${PHP_LATEST_STABLE} ]]; then
wget https://scrutinizer-ci.com/ocular.phar
chmod +x ocular.phar
php ocular.phar code-coverage:upload --format=php-clover ./tmp/clover.xml
fi
fi