chore: ci fixes

This commit is contained in:
nuno maduro
2026-09-14 15:41:16 +01:00
parent 7cdebc6a95
commit 942d6aead1
3 changed files with 10 additions and 5 deletions
@@ -369,7 +369,7 @@ final class WrapperRunner implements RunnerInterface
$failedEvents = array_merge_recursive($testResultSum->testFailedEvents(), $testResult->testFailedEvents());
$testResultSum = new TestResult(
(int) $testResultSum->hasTests() + (int) $testResult->hasTests(),
ResultReflection::numberOfTests($testResultSum) + self::numberOfTestsSeenByWorker($testResult),
$testResultSum->numberOfTestsRun() + $testResult->numberOfTestsRun(),
$testResultSum->numberOfAssertions() + $testResult->numberOfAssertions(),
array_merge_recursive($testResultSum->testErroredEvents(), $testResult->testErroredEvents()),
@@ -500,6 +500,11 @@ final class WrapperRunner implements RunnerInterface
return $exitcode;
}
private static function numberOfTestsSeenByWorker(TestResult $result): int
{
return max(ResultReflection::numberOfTests($result), $result->numberOfTestsRun());
}
/**
* @return array{self: non-negative-int, direct: non-negative-int, indirect: non-negative-int, unknown: non-negative-int}
*/
+1 -1
View File
@@ -206,7 +206,7 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
{
$filtered = $this->removeParallelArguments($arguments);
return ['php', ...$filtered, '--test-directory='.$testPath, '--list-tests'];
return [PHP_BINARY, ...$filtered, '--test-directory='.$testPath, '--list-tests'];
}
/**
+3 -3
View File
@@ -367,7 +367,7 @@ describe('buildListTestsCommand', function (): void {
$command = $method->invoke($shard, ['bin/pest', '--update-shards'], 'custom/suite');
expect($command)->toBe([
'php',
PHP_BINARY,
'bin/pest',
'--update-shards',
'--test-directory=custom/suite',
@@ -385,7 +385,7 @@ describe('buildListTestsCommand', function (): void {
$command = $method->invoke($shard, ['bin/pest', '--parallel', '--update-shards', '-p'], 'tests');
expect($command)->toBe([
'php',
PHP_BINARY,
'bin/pest',
'--update-shards',
'--test-directory=tests',
@@ -415,7 +415,7 @@ describe('buildListTestsCommand', function (): void {
$command = $method->invoke($shard, ['bin/pest', '--parallel', '--processes=4', '--update-shards'], 'tests');
expect($command)->toBe([
'php',
PHP_BINARY,
'bin/pest',
'--update-shards',
'--test-directory=tests',