1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-02 17:48:00 +01:00

Merge pull request #355 from bantu/scrutinizer-coverage

Scrutinizer CI code coverage

* bantu/scrutinizer-coverage:
  Specify the runs option for external code coverage.
  No Scrutinizer Code Coverage on HHVM either.
  Extract into upload-code-coverage-scrutinizer.sh
  Add -html suffix to existing code-coverage shell script.
  Configure Scrutinizer CI to expect external code coverage data.
  Upload clover.xml from Travis CI into Scrutinizer CI.
  Produce a clover.xml code coverage file.
This commit is contained in:
Andreas Fischer 2014-06-01 21:55:25 +02:00
commit bb3c2ca28d
5 changed files with 24 additions and 1 deletions

6
.scrutinizer.yml Normal file
View File

@ -0,0 +1,6 @@
imports:
- php
tools:
external_code_coverage:
runs: 5 # No Code Coverage on PHP 5.2 and HHVM

View File

@ -1,5 +1,7 @@
language: php
# When adding environments here, the number of runs specified in .scrutinizer.yml
# may have to be adjusted.
php:
- 5.2
- 5.3.3
@ -25,4 +27,5 @@ script:
- travis/run-phpunit.sh
after_success:
- sh -c "if $TRAVIS_SECURE_ENV_VARS; then travis/upload-code-coverage.sh; fi"
- sh -c "if $TRAVIS_SECURE_ENV_VARS; then travis/upload-code-coverage-html.sh; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' -a '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then travis/upload-code-coverage-scrutinizer.sh; fi"

View File

@ -24,4 +24,5 @@ fi
$PHPUNIT_EXTRA_ARGS \
--verbose \
--coverage-text \
--coverage-clover code_coverage/clover.xml \
--coverage-html code_coverage/

View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# This file is part of the phpseclib project.
#
# (c) Andreas Fischer <bantu@phpbb.com>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
set -e
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover code_coverage/clover.xml