Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
20 changes: 20 additions & 0 deletions tests/continuousphp/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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);
});
})();
1 change: 1 addition & 0 deletions tests/continuousphp/oci8.phpunit.continuousphp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
bootstrap="bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down