-
Couldn't load subscription status.
- Fork 111
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
Changes from 18 commits
cc9f05e
6e9daf1
747ec2d
9c591dd
f4be5fe
9cc6c77
b31655d
95851bd
d4edda1
0645768
971df8b
72d9520
7c87507
1ce7e3b
f55a990
0265944
4d596fe
998db4f
da0569a
ef9a60a
e686def
6dccbc4
dd9d5bc
cf4eb88
7491018
8da5e2f
5193dc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,10 @@ on: | |
| branches: | ||
| - "2.0.x" | ||
|
|
||
| concurrency: | ||
| group: tests-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: "Lint" | ||
|
|
@@ -148,7 +152,7 @@ jobs: | |
| mutation-testing: | ||
| name: "Mutation Testing" | ||
| runs-on: "ubuntu-latest" | ||
| needs: ["tests", "static-analysis"] | ||
| #needs: ["tests", "static-analysis"] | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
|
|
@@ -169,7 +173,7 @@ jobs: | |
| php-version: "${{ matrix.php-version }}" | ||
| ini-file: development | ||
| extensions: pdo, mysqli, pgsql, pdo_mysql, pdo_pgsql, pdo_sqlite, mongodb | ||
| tools: infection:0.31.6 | ||
| tools: infection:0.31.7 | ||
|
|
||
| - name: "Allow installing on PHP 8.4" | ||
| if: matrix.php-version == '8.4' | ||
|
|
@@ -178,10 +182,32 @@ jobs: | |
| - name: "Install dependencies" | ||
| run: "composer install --no-interaction --no-progress" | ||
|
|
||
| - uses: "actions/download-artifact@v4" | ||
| - name: "Checkout build-infection" | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| name: "result-cache-${{ matrix.php-version }}" | ||
| path: "tmp/" | ||
| repository: "phpstan/build-infection" | ||
| path: "build-infection" | ||
| ref: "1.x" | ||
|
|
||
| - name: "Install build-infection dependencies" | ||
| working-directory: "build-infection" | ||
| run: "composer install --no-interaction --no-progress" | ||
|
|
||
| - name: "Configure mutators" | ||
| run: | | ||
| php build-infection/bin/infection-config.php \ | ||
| --mutator-class='PHPStan\Infection\TrinaryLogicMutator' \ | ||
| > infection.json5 | ||
| cat infection.json5 | jq | ||
|
|
||
| - name: "Cache Result cache" | ||
| uses: actions/cache@v4 | ||
| if: always() | ||
| with: | ||
| path: ./tmp | ||
| key: "result-cache-v14-${{ matrix.php-version }}-${{ github.run_id }}" | ||
staabm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| restore-keys: | | ||
| result-cache-v14-${{ matrix.php-version }}- | ||
|
|
||
| - name: "Run infection" | ||
| run: | | ||
|
|
@@ -240,9 +266,3 @@ jobs: | |
|
|
||
| - name: "PHPStan" | ||
| run: "make phpstan" | ||
|
|
||
| - uses: "actions/upload-artifact@v4" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of uploading/downloading artifacts for caching, I changed to use |
||
| with: | ||
| # "update-packages" is not relevant for the download-artifact counterpart, but we need it here to get unique artifact names across all jobs | ||
| name: "result-cache-${{ matrix.php-version }}${{ matrix.update-packages && '-packages-updated' || '' }}" | ||
| path: "tmp/resultCache.php" | ||
This file was deleted.
This file was deleted.
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.