mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
chore: adjusts for parallel testing
This commit is contained in:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -43,6 +43,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Unit Tests in Parallel
|
- name: Unit Tests in Parallel
|
||||||
run: composer test:parallel
|
run: composer test:parallel
|
||||||
# Waiting for Paratest support...
|
|
||||||
if: false
|
|
||||||
|
|
||||||
|
|||||||
3
TODO.md
3
TODO.md
@ -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).
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1.0",
|
"php": "^8.1.0",
|
||||||
"brianium/paratest": "^7.1.2",
|
"brianium/paratest": "^7.1.3",
|
||||||
"nunomaduro/collision": "^7.4.0",
|
"nunomaduro/collision": "^7.4.0",
|
||||||
"nunomaduro/termwind": "^1.15.1",
|
"nunomaduro/termwind": "^1.15.1",
|
||||||
"pestphp/pest-plugin": "^2.0.1",
|
"pestphp/pest-plugin": "^2.0.1",
|
||||||
@ -79,6 +79,7 @@
|
|||||||
"@test:lint",
|
"@test:lint",
|
||||||
"@test:types",
|
"@test:types",
|
||||||
"@test:unit",
|
"@test:unit",
|
||||||
|
"@test:parallel",
|
||||||
"@test:integration"
|
"@test:integration"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -153,7 +153,7 @@
|
|||||||
|
|
||||||
DEPR Tests\Features\Deprecated
|
DEPR Tests\Features\Deprecated
|
||||||
! deprecated → str_contains(): Passing null to parameter #2 ($needle) of type string is deprecated // tests/Features/Deprecated.php:6
|
! 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
|
PASS Tests\Features\Exceptions
|
||||||
✓ it gives access the the underlying expectException
|
✓ it gives access the the underlying expectException
|
||||||
@ -988,13 +988,14 @@
|
|||||||
|
|
||||||
PASS Tests\Visual\Collision
|
PASS Tests\Visual\Collision
|
||||||
✓ collision with ([''])
|
✓ collision with ([''])
|
||||||
|
✓ collision with (['--parallel'])
|
||||||
|
|
||||||
PASS Tests\Visual\Help
|
PASS Tests\Visual\Help
|
||||||
✓ visual snapshot of help command output
|
✓ visual snapshot of help command output
|
||||||
|
|
||||||
WARN Tests\Visual\Parallel
|
PASS Tests\Visual\Parallel
|
||||||
- parallel
|
✓ parallel
|
||||||
- a parallel test can extend another test with same name
|
✓ a parallel test can extend another test with same name
|
||||||
|
|
||||||
PASS Tests\Visual\SingleTestOrDirectory
|
PASS Tests\Visual\SingleTestOrDirectory
|
||||||
✓ allows to run a single test
|
✓ allows to run a single test
|
||||||
@ -1015,4 +1016,4 @@
|
|||||||
PASS Tests\Visual\Version
|
PASS Tests\Visual\Version
|
||||||
✓ visual snapshot of help command output
|
✓ visual snapshot of help command output
|
||||||
|
|
||||||
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 16 skipped, 706 passed (1713 assertions)
|
Tests: 1 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 14 skipped, 710 passed (1717 assertions)
|
||||||
@ -38,4 +38,5 @@ test('collision', function (array $arguments) {
|
|||||||
expect($output())->toContain(file_get_contents($snapshot));
|
expect($output())->toContain(file_get_contents($snapshot));
|
||||||
})->with([
|
})->with([
|
||||||
[['']],
|
[['']],
|
||||||
|
[['--parallel']],
|
||||||
])->skipOnWindows();
|
])->skipOnWindows();
|
||||||
|
|||||||
@ -18,10 +18,10 @@ $run = function () {
|
|||||||
|
|
||||||
test('parallel', function () use ($run) {
|
test('parallel', function () use ($run) {
|
||||||
expect($run('--exclude-group=integration'))
|
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');
|
->toContain('Parallel: 3 processes');
|
||||||
})->skip();
|
})->skipOnWindows();
|
||||||
|
|
||||||
test('a parallel test can extend another test with same name', function () use ($run) {
|
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)');
|
expect($run('tests/Fixtures/Inheritance'))->toContain('Tests: 1 skipped, 2 passed (2 assertions)');
|
||||||
})->skip();
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user