Skip to content

Commit

Permalink
Use the Roave Static Analysis plugin to remove mutations not allowed …
Browse files Browse the repository at this point in the history
…by the type rules
  • Loading branch information
ciaranmcnulty committed Nov 13, 2022
1 parent 71cc900 commit 09eca5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: "memory_limit=-1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -64,11 +65,15 @@ jobs:

- name: Mutation tests - minimum thresholds
run: |
vendor/bin/infection --min-msi=85 --min-covered-msi=88
vendor/bin/roave-infection-static-analysis-plugin \
--min-msi=90 \
--min-covered-msi=90
working-directory: php

- name: Mutation tests - modifications
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
vendor/bin/infection --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations
vendor/bin/roave-infection-static-analysis-plugin \
--git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF \
--logger-github --ignore-msi-with-no-mutations
working-directory: php
3 changes: 2 additions & 1 deletion php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"friendsofphp/php-cs-fixer": "^3.5",
"psalm/plugin-phpunit": "^0.18.0",
"nikic/php-parser": "^4.14",
"infection/infection": "^0.26.16"
"infection/infection": "^0.26.16",
"roave/infection-static-analysis-plugin": "^1.25"
},
"repositories": [
{
Expand Down

0 comments on commit 09eca5c

Please sign in to comment.