Skip to content

Commit cf755c1

Browse files
ondrejmirteskukulich
authored andcommitted
Try phpstan-mutant-killer-infection-runner
1 parent 4966d4b commit cf755c1

File tree

3 files changed

+358
-52
lines changed

3 files changed

+358
-52
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,60 @@ jobs:
184184
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
185185
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
186186

187+
mutation-tests-phpstan:
188+
name: "Mutation tests with PHPStan"
189+
190+
runs-on: ${{ matrix.operating-system }}
191+
192+
strategy:
193+
matrix:
194+
dependencies:
195+
- "locked"
196+
php-version:
197+
- "8.4"
198+
operating-system:
199+
- "ubuntu-latest"
200+
201+
steps:
202+
- name: "Checkout"
203+
uses: "actions/checkout@v4"
204+
205+
- name: "Install PHP"
206+
uses: "shivammathur/[email protected]"
207+
with:
208+
coverage: "xdebug"
209+
php-version: "${{ matrix.php-version }}"
210+
extensions: intl, sodium
211+
ini-values: memory_limit=-1, zend.assertions=1
212+
213+
- name: "Install dependencies"
214+
uses: "ramsey/[email protected]"
215+
with:
216+
dependency-versions: "${{ matrix.dependencies }}"
217+
218+
- name: "Install CI dependencies"
219+
uses: "ramsey/[email protected]"
220+
with:
221+
dependency-versions: "${{ matrix.dependencies }}"
222+
working-directory: "tools"
223+
custom-cache-suffix: "ci"
224+
225+
- name: "Warmup PHPStan"
226+
run: "tools/vendor/bin/phpstan analyse --memory-limit=-1"
227+
228+
- name: "Infection"
229+
run: "tools/vendor/bin/phpstan-mutant-killer-infection-runner --phpstan-config phpstan.neon --log log.txt --threads=$(nproc)"
230+
env:
231+
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
232+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
233+
234+
- uses: actions/upload-artifact@v4
235+
if: ${{ !cancelled() }}
236+
with:
237+
name: log.txt
238+
path: log.txt
239+
if-no-files-found: error
240+
187241
compatibility:
188242
name: "Test Compatibility"
189243

tools/composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"phpstan/phpstan-phpunit": "^2.0.6",
66
"vimeo/psalm": "^6.11.0",
77
"roave/backward-compatibility-check": "^8.13.0",
8-
"roave/infection-static-analysis-plugin": "^1.37.0"
8+
"roave/infection-static-analysis-plugin": "^1.38.0",
9+
"phpstan/mutant-killer-infection-runner": "1.0.x-dev"
910
},
1011
"config": {
1112
"allow-plugins": {
@@ -20,5 +21,7 @@
2021
"psr-4": {
2122
"Roave\\BetterReflection\\": "../src"
2223
}
23-
}
24+
},
25+
"minimum-stability": "dev",
26+
"prefer-stable": true
2427
}

0 commit comments

Comments
 (0)