Skip to content

Auto-review tests to enforce @group annotations #6772

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

Merged
merged 5 commits into from
Nov 12, 2022

Conversation

paulbalandan
Copy link
Member

Description
Needs #6770 for tests to pass.
Code based on my private repo.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan added the testing Pull requests that changes tests only label Oct 28, 2022
@MGatner
Copy link
Member

MGatner commented Oct 28, 2022

Under deliberation at the other PR.

@paulbalandan
Copy link
Member Author

Not sure, but DatabaseLive and CacheLive groups are not read?

> vendor/bin/phpunit --list-groups
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

Available test group(s):
 - AutoReview
 - Others
 - SeparateProcess
 - default

@MGatner
Copy link
Member

MGatner commented Nov 6, 2022

Not sure, but DatabaseLive and CacheLive groups are not read?

That's very odd! I will do a little digging.

@MGatner
Copy link
Member

MGatner commented Nov 6, 2022

I got nothing; everything looks correct to me. I think we proceed with this and then troubleshoot some more if the groups aren't actually working.

@paulbalandan
Copy link
Member Author

I did some testing on the testsuites and it seems the changes altered the groups.

@kenjis
Copy link
Member

kenjis commented Nov 6, 2022

$ vendor/bin/phpunit --list-groups
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

Available test group(s):
 - AutoReview
 - Others
 - SeparateProcess
 - default

@paulbalandan paulbalandan marked this pull request as draft November 6, 2022 12:44
@paulbalandan
Copy link
Member Author

Cannot merge this for now. Coverage decreased to 15.9%. 🤯

@paulbalandan
Copy link
Member Author

This is not a bug of PHPUnit. Testing with a minimal repo lists all groups as expected. So it has something to do with the current phpunit.xml.dist and the changes to it.

@paulbalandan
Copy link
Member Author

I am so confused why the tests hang! 😤

@paulbalandan paulbalandan marked this pull request as ready for review November 10, 2022 03:12
@paulbalandan paulbalandan requested a review from MGatner November 10, 2022 04:11
@kenjis
Copy link
Member

kenjis commented Nov 10, 2022

$ vendor/bin/phpunit --list-groups
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

Available test group(s):
 - AutoReview
 - CacheLive
 - DatabaseLive
 - Others
 - SeparateProcess

Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked into the details of the check implementation.

@paulbalandan paulbalandan merged commit a9859e8 into codeigniter4:develop Nov 12, 2022
@paulbalandan paulbalandan deleted the auto-review-group branch November 12, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Pull requests that changes tests only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants