Utilize build-infection - #699
Conversation
| - name: "PHPStan" | ||
| run: "make phpstan" | ||
|
|
||
| - uses: "actions/upload-artifact@v4" |
There was a problem hiding this comment.
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
| - name: "Configure mutators" | ||
| run: | | ||
| php build-infection/bin/infection-config.php \ | ||
| --mutator-class='PHPStan\Infection\TrinaryLogicMutator' \ |
There was a problem hiding this comment.
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.
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.
| - name: "Configure mutators" | ||
| run: cp build-infection/resources/infection.json5 . |
There was a problem hiding this comment.
ok, here we take the config 1:1 from build-infection
There was a problem hiding this comment.
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.
added a --source-directory='another/path' option
There was a problem hiding this comment.
hmm I think whether it would make sense to move this phpstan-src/build/PHPStan/Build rules into a separate repo, as this might make sense to be re-used in 1st party extension repos?
There was a problem hiding this comment.
They're not relevant like that yet, mostly because phpstan-src can use PHP 8+ features thanks to downgrading and the extensions can't.
| - name: "Configure mutators" | ||
| run: cp build-infection/resources/infection.json5 . |
There was a problem hiding this comment.
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