Workaround for the inability to use a post-PHPUnit script on ContinuousPHP

parent af81c1fd
......@@ -21,7 +21,7 @@ before_commands:
tools:
external_code_coverage:
timeout: 3600
runs: 20 # 17x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes)
runs: 21 # 17x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 1x ContinuousPHP
filter:
excluded_paths:
......
<?php
declare(strict_types=1);
(function () : void {
$pos = array_search('--coverage-clover', $_SERVER['argv'], true);
if ($pos === false) {
return;
}
$file = $_SERVER['argv'][$pos + 1];
register_shutdown_function(function () use ($file) : void {
$cmd = 'wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar'
. ' && php ocular.phar code-coverage:upload --format=php-clover ' . escapeshellarg($file);
passthru($cmd);
});
})();
......@@ -6,6 +6,7 @@
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
bootstrap="bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment