From 5175bec268fb902c54e3e606d38cdcd1582dafc9 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Wed, 18 Mar 2026 12:57:26 +0000 Subject: [PATCH] Add mutation testing with Infection --- .github/workflows/continuous-integration.yml | 16 ++++++++++++++++ infection.json5 | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 infection.json5 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2c610d3..54ffeaa 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -203,6 +203,22 @@ jobs: - name: Run phpstan run: vendor/bin/phpstan + mutation-testing: + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.4 + extensions: intl, sodium, zip + tools: infection + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v6 + - uses: ramsey/composer-install@v3 + - name: Run infection + run: sudo infection --min-msi=68 --min-covered-msi=68 --threads=4 --show-mutations=max --no-progress + build-assets: needs: - unit-tests diff --git a/infection.json5 b/infection.json5 new file mode 100644 index 0000000..c963786 --- /dev/null +++ b/infection.json5 @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/infection/infection/0.32.6/resources/schema.json", + "source": { + "directories": [ + "src" + ] + }, + "mutators": { + "@default": true + } +} \ No newline at end of file