Add support for PHP 8.3 tests

This commit is contained in:
David Bomba 2024-09-03 09:26:58 +10:00
parent aa036c6e40
commit fe2dbebdf5
2 changed files with 6 additions and 4 deletions

View File

@ -18,7 +18,7 @@ jobs:
phpunit-versions: ['latest']
ci_node_total: [ 8 ]
ci_node_index: [ 0, 1, 2, 3, 4, 5, 6, 7]
laravel: [10.*]
laravel: [11.*]
dependency-version: [prefer-stable]
env:

View File

@ -28,14 +28,16 @@ $tests = \Illuminate\Support\Str::of($process->getOutput())
))
->filter(fn (string $test) => !empty($test)) // Make sure there are no empty lines
->unique() // We only need unique classes
->split((int) getenv('CI_NODE_TOTAL')) // Split it into equally sized chunks
->get((int) getenv('CI_NODE_INDEX')); // Get the index we need for this instance
->split(10)
->get(1);
// ->split((int) getenv('CI_NODE_TOTAL')) // Split it into equally sized chunks
// ->get((int) getenv('CI_NODE_INDEX')); // Get the index we need for this instance
/**
* Run phpunit with a filter:
* phpunit --filter 'TestClass|AnotherTestClass|...'
*/
$process = new \Symfony\Component\Process\Process(['php artisan test', '--testdox', '--filter', $tests->join('|')], timeout: null);
$process = new \Symfony\Component\Process\Process(['php', 'artisan', 'test', '--testdox', '--filter', $tests->join('|')], timeout: null);
$process->start();
// Make sure we have live data output