From 2ccdcf23cb8c8fe037a34bae660245972c57a596 Mon Sep 17 00:00:00 2001 From: Ciaran McNulty Date: Fri, 11 Nov 2022 11:08:11 +0000 Subject: [PATCH] Use the Roave Static Analysis plugin to remove mutations not allowed by the type rules --- .github/workflows/test-php.yml | 9 +++++++-- php/composer.json | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index c2b5e29cbf..a2ab041efa 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -25,6 +25,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" + ini-values: "memory_limit=-1" - name: Discover composer cache directory id: composer-cache @@ -59,11 +60,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 diff --git a/php/composer.json b/php/composer.json index 5392dd524f..3027504904 100644 --- a/php/composer.json +++ b/php/composer.json @@ -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": [ {