Skip to content

Commit 2ccdcf2

Browse files
committed
Use the Roave Static Analysis plugin to remove mutations not allowed by the type rules
1 parent 4071093 commit 2ccdcf2

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/test-php.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
uses: shivammathur/setup-php@v2
2626
with:
2727
php-version: "${{ matrix.php }}"
28+
ini-values: "memory_limit=-1"
2829

2930
- name: Discover composer cache directory
3031
id: composer-cache
@@ -59,11 +60,15 @@ jobs:
5960

6061
- name: Mutation tests - minimum thresholds
6162
run: |
62-
vendor/bin/infection --min-msi=85 --min-covered-msi=88
63+
vendor/bin/roave-infection-static-analysis-plugin \
64+
--min-msi=90 \
65+
--min-covered-msi=90
6366
working-directory: php
6467

6568
- name: Mutation tests - modifications
6669
run: |
6770
git fetch --depth=1 origin $GITHUB_BASE_REF
68-
vendor/bin/infection --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations
71+
vendor/bin/roave-infection-static-analysis-plugin \
72+
--git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF \
73+
--logger-github --ignore-msi-with-no-mutations
6974
working-directory: php

php/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"friendsofphp/php-cs-fixer": "^3.5",
2424
"psalm/plugin-phpunit": "^0.18.0",
2525
"nikic/php-parser": "^4.14",
26-
"infection/infection": "^0.26.16"
26+
"infection/infection": "^0.26.16",
27+
"roave/infection-static-analysis-plugin": "^1.25"
2728
},
2829
"repositories": [
2930
{

0 commit comments

Comments
 (0)