New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
combine --list-tests
with --group
#5702
Comments
asked differently: maybe there is already a mechanism to determine a list of test-classes given a group-name? |
just leaving a note for myself: the initial |
It's not the same but for the same reason, I tried to make something like #4449, for when paratest can't be used. Grouping is a very manual / tedious process, I wanted something easier: give me all tests, split them up (aka: slice them) and feed a slice of test back to be run by phpunit. The PR didn't make it and, before that, I'm having some glue script which essentially take the output of Works "production grade" but I wish all that gluing wouldn't be necessary. |
implemented a similar thing for PHPStan in phpstan/phpstan-src#2916 which allows parallelizing in a GitHub Action. |
We run the expensive levels tests only for a single PHP version which can be the latest one, we can update PHPUnit in CI before running the (sliced) tests. |
@ondrejmirtes I am not sure whether its a good idea to run a portion of tests with a different PHPunit version, since it will emit different warnings/deprecations and it might be cumbersome to maintain tests in a way which works on several phpunit major versions |
@staabm We can definitely make it work ;) |
Which is why newer versions of PHPUnit emit a warning when The intent for options such as For a use case such as what you have in mind, I prefer to do filtering/sorting/partitioning of tests outside of PHPUnit. First, I use the
|
I did my initial tests with phpunit 9.x therefore did not realize there is also a I would therefore close this issue here.
if you still want to accept the PR, I am fine with finishing it of course. |
Superseded by #5720. |
running
php vendor/bin/phpunit --group levels --list-tests
on the PHPStan-src codebase returns the same list of tests, as when not using--group levels
:php vendor/bin/phpunit --list-tests
I would expect
--group levels
to apply the same filtering as then running phpunit itself with--group levels
.what I want to achieve: I want to use phpunit test filtering capabilities to separate the huge PHPStan test-suite into groups which I can run in parallel in GitHub Actions. running it in several parallel GitHub Action jobs has the benefit of utilizing more CPUs and therefore a faster feedback loop
The text was updated successfully, but these errors were encountered: