From 6ced4f931affdd8ac418bd03e25842651f99d5ff Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Wed, 24 Apr 2024 08:46:03 -0700 Subject: [PATCH] clean up mutation config --- .github/workflows/mutation.yml | 4 ++-- composer.json | 3 +++ infection.json5 | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 1a2862662..d46f0c355 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -31,8 +31,8 @@ jobs: if: github.event_name == 'pull_request' run: | git fetch --depth=1 origin $GITHUB_BASE_REF - # Explicitly specify GitHub logger since our Stryker reporting will otherwise disable it. - php vendor/bin/infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --only-covered --min-covered-msi=100 + # nproc returns 4 threads on GitHub Actions and this seems to provide the best performance. + composer mutation-diff-lines - name: Run Infection for all files if: github.event_name == 'push' diff --git a/composer.json b/composer.json index 2a5cdf683..c83d0d7d5 100644 --- a/composer.json +++ b/composer.json @@ -132,6 +132,9 @@ "mutation": [ "infection --threads=max --only-covered" ], + "mutation-diff-lines": [ + "infection --threads=max --only-covered --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --min-covered-msi=100" + ], "cs": "phpcs", "cbf": "phpcbf", "unit": [ diff --git a/infection.json5 b/infection.json5 index 278489939..5b57c86d0 100644 --- a/infection.json5 +++ b/infection.json5 @@ -9,6 +9,7 @@ "stryker": { "report": "main" }, + "github": true, "html": "var/infection.html" }, "mutators": {