Skip to content

Commit 8e97978

Browse files
committed
Use the Roave Static Analysis plugin to remove mutations not allowed by the type rules
1 parent c192b78 commit 8e97978

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
@@ -28,6 +28,7 @@ jobs:
2828
uses: shivammathur/setup-php@v2
2929
with:
3030
php-version: "${{ matrix.php }}"
31+
ini-values: "memory_limit=-1"
3132
env:
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334

@@ -64,11 +65,15 @@ jobs:
6465

6566
- name: Mutation tests - minimum thresholds
6667
run: |
67-
vendor/bin/infection --min-msi=85 --min-covered-msi=88
68+
vendor/bin/roave-infection-static-analysis-plugin \
69+
--min-msi=90 \
70+
--min-covered-msi=90
6871
working-directory: php
6972

7073
- name: Mutation tests - modifications
7174
run: |
7275
git fetch --depth=1 origin $GITHUB_BASE_REF
73-
vendor/bin/infection --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations
76+
vendor/bin/roave-infection-static-analysis-plugin \
77+
--git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF \
78+
--logger-github --ignore-msi-with-no-mutations
7479
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)