Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"symfony/filesystem": "^5.4.45 || ^6.4.13 || ^7.0 || ^8.0",
"symfony/http-client": "^5.4.49 || ^6.4.17 || ^7.0 || ^8.0",
"symfony/polyfill-php83": "^1.31.0",
"symfony/process": "^5.4.47 || ^6.4.15 || ^7.0 || ^8.0"
"symfony/process": "^5.4.51 || ^6.4.15 || ^7.0 || ^8.0"
},
"autoload": {
"psr-4": {
Expand All @@ -56,6 +56,7 @@
]
},
"require-dev": {
"ext-simplexml": "*",
"buggregator/trap": "^1.13.0",
"composer/composer": "^2.8.4",
"cweagans/composer-patches": "^2.0",
Expand Down Expand Up @@ -98,10 +99,10 @@
"cs:fix": "php-cs-fixer fix -v",
"psalm": "psalm",
"psalm:baseline": "psalm --set-baseline=psalm-baseline.xml",
"test:unit": "phpunit --testsuite=Unit --color=always --testdox",
"test:func": "phpunit --testsuite=Functional --color=always --testdox",
"test:unit": "php tests/ci-runner.php vendor/bin/phpunit --testsuite=Unit --color=always --testdox",
"test:func": "php tests/ci-runner.php vendor/bin/phpunit --testsuite=Functional --color=always --testdox",
Comment thread
roxblnfk marked this conversation as resolved.
Outdated
"test:arch": "phpunit --testsuite=Arch --color=always --testdox",
"test:accept": "phpunit --testsuite=Acceptance --color=always --testdox"
"test:accept": "php tests/ci-runner.php vendor/bin/phpunit --testsuite=Acceptance --color=always --testdox"
},
"config": {
"sort-packages": true,
Expand Down
24 changes: 24 additions & 0 deletions tests/ci-runner.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

/**
* Sometimes Windows CI runner fails to report test results properly.
* This script is a workaround for that.
*/

$command = \implode(' ', \array_slice($argv, 1));
$logFile = 'runtime/phpunit.xml';

\passthru("php $command --log-junit=$logFile 2>&1", $code);
Comment thread
xepozz marked this conversation as resolved.
Outdated

if (\file_exists($logFile)) {
$xml = \simplexml_load_file($logFile);
$failures = (int) $xml['failures'] + (int) $xml['errors'];

if ($failures === 0) {
exit(0);
}
}

exit($code ?: 1);
Loading