diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4015ebc..5c80602f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,6 +43,4 @@ jobs: - name: Unit Tests in Parallel run: composer test:parallel - # Waiting for Paratest support... - if: false diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 73e90ddf..00000000 --- a/TODO.md +++ /dev/null @@ -1,3 +0,0 @@ -1. Re-add Parallel Job on workflow. -2. Re-add Parallel Testing on composer. -3. Re-add Parallel skipped tests (Visual collision, and visual parallel). diff --git a/composer.json b/composer.json index ea03796e..2d3be6e1 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "require": { "php": "^8.1.0", - "brianium/paratest": "^7.1.2", + "brianium/paratest": "^7.1.3", "nunomaduro/collision": "^7.4.0", "nunomaduro/termwind": "^1.15.1", "pestphp/pest-plugin": "^2.0.1", @@ -79,6 +79,7 @@ "@test:lint", "@test:types", "@test:unit", + "@test:parallel", "@test:integration" ] }, diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index ad780f14..469567e1 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -153,7 +153,7 @@ DEPR Tests\Features\Deprecated ! deprecated → str_contains(): Passing null to parameter #2 ($needle) of type string is deprecated // tests/Features/Deprecated.php:6 - ! user deprecated → Since foo 1.0: This is a deprecation description // vendor/symfony/deprecation-contracts/function.php:25 + ✓ user deprecated PASS Tests\Features\Exceptions ✓ it gives access the the underlying expectException @@ -988,13 +988,14 @@ PASS Tests\Visual\Collision ✓ collision with (['']) + ✓ collision with (['--parallel']) PASS Tests\Visual\Help ✓ visual snapshot of help command output - WARN Tests\Visual\Parallel - - parallel - - a parallel test can extend another test with same name + PASS Tests\Visual\Parallel + ✓ parallel + ✓ a parallel test can extend another test with same name PASS Tests\Visual\SingleTestOrDirectory ✓ allows to run a single test @@ -1015,4 +1016,4 @@ PASS Tests\Visual\Version ✓ visual snapshot of help command output - Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 16 skipped, 706 passed (1713 assertions) \ No newline at end of file + Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 14 skipped, 710 passed (1717 assertions) \ No newline at end of file diff --git a/tests/Visual/Collision.php b/tests/Visual/Collision.php index bf1c4fd7..de6dad47 100644 --- a/tests/Visual/Collision.php +++ b/tests/Visual/Collision.php @@ -38,4 +38,5 @@ test('collision', function (array $arguments) { expect($output())->toContain(file_get_contents($snapshot)); })->with([ [['']], + [['--parallel']], ])->skipOnWindows(); diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index 4e2fc0fb..10f0d316 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -18,10 +18,10 @@ $run = function () { test('parallel', function () use ($run) { expect($run('--exclude-group=integration')) - ->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 11 skipped, 697 passed (1702 assertions)') + ->toContain('Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 11 skipped, 698 passed (1702 assertions)') ->toContain('Parallel: 3 processes'); -})->skip(); +})->skipOnWindows(); test('a parallel test can extend another test with same name', function () use ($run) { expect($run('tests/Fixtures/Inheritance'))->toContain('Tests: 1 skipped, 2 passed (2 assertions)'); -})->skip(); +});