-
Notifications
You must be signed in to change notification settings - Fork 112
Utilize build-infection #699
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
base: 2.0.x
Are you sure you want to change the base?
Conversation
| - name: "PHPStan" | ||
| run: "make phpstan" | ||
|
|
||
| - uses: "actions/upload-artifact@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.
instead of uploading/downloading artifacts for caching, I changed to use actions/cache because that way it also works on phpstan-src. special in phpstan-src is that the "static-analysis" and "test" jobs are spread across 2 workflows, which makes artifact handling otherwise complicated
.github/workflows/build.yml
Outdated
| - name: "Configure mutators" | ||
| run: | | ||
| php build-infection/bin/infection-config.php \ | ||
| --mutator-class='PHPStan\Infection\TrinaryLogicMutator' \ |
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.
here we can configure the used mutators by just appending
--mutator-class='PHPStan\Infection\TrinaryLogicMutator' \
as often as required
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'd like the list to be just in build-infection. I don't expect different projects to need different mutators.
This reverts commit 72d9520.
.github/workflows/build.yml
Outdated
| - name: "Configure mutators" | ||
| run: cp build-infection/resources/infection.json5 . |
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.
ok, here we take the config 1:1 from build-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.
Just FYI in phpstan-src I'll also want to add https://github.com/phpstan/phpstan-src/tree/2.1.x/build/PHPStan/Build because there are some tests for that in https://github.com/phpstan/phpstan-src/tree/2.1.x/tests/PHPStan/Build.
So if we're copying the whole config I'd still like to be able to modify it afterward.
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.
added a --source-directory='another/path' option
.github/workflows/build.yml
Outdated
| - name: "Configure mutators" | ||
| run: cp build-infection/resources/infection.json5 . |
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.
Just FYI in phpstan-src I'll also want to add https://github.com/phpstan/phpstan-src/tree/2.1.x/build/PHPStan/Build because there are some tests for that in https://github.com/phpstan/phpstan-src/tree/2.1.x/tests/PHPStan/Build.
So if we're copying the whole config I'd still like to be able to modify it afterward.
closes phpstan/build-infection#7