-
Couldn't load subscription status.
- Fork 544
Setup mutation testing #4480
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
Setup mutation testing #4480
Conversation
|
AFAIK the usage of build-infection isn't yet merged in phpstan-doctrine? I'd finish it there first before doing other repos. |
yes, its waiting in phpstan/phpstan-doctrine#699 for the merge. |
|
This pull request has been marked as ready for review. |
.github/workflows/tests.yml
Outdated
| mutation-testing: | ||
| name: "Mutation Testing" | ||
| runs-on: "ubuntu-latest" | ||
| needs: ["tests", "tests-levels"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests-levels? I don't want Infection to run these levels so it doesn't make sense to wait for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: what about static analysis? I know it's in another workflow but not warmed-up cache might have a downside or two here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests-levels? I don't want Infection to run these levels so it doesn't make sense to wait for them.
I initially added levels to make sure we run late enough for the static analysis step... does no longer make sense as we no longer have the artifact down/upload step.
deleted it.
Also: what about static analysis? I know it's in another workflow but not warmed-up cache might have a downside or two here?
as we restore the previous cache I think it will be "fresh enough". waiting across workflows will complicate it, as this is only supported in github actions with work-arrounds. I don't think its worth the effort.
infection will start and fail in the "preparation phase" when SA is not green.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we could just run PHPStan again before Infection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infection will run it once before it starts it as a process killer
.github/workflows/tests.yml
Outdated
| cat infection.json5 | jq | ||
| - name: "Cache Result cache" | ||
| uses: actions/cache@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't going to save the cache if the build fails, right? Shouldn't we do what's recommended here? https://phpstan.org/user-guide/result-cache#setup-in-github-actions
|
Thank you! I'm really interested what it will find here 😊 |
I will check with the infection team in infection/infection#2491 :) |
|
ok future PRs to phpstan-src will now have infection coverage, see a first e2e running build in e.g. https://github.com/phpstan/phpstan-src/actions/runs/18841268167/job/53754293666?pr=4470 //cc @maks-rafalko |
|
Cool! Thanks for working on this @staabm and @ondrejmirtes. Looking forward to hear the results after some time. So please share them somewhere |
analog