From bc17a17e2a9e5ac0719815867532635640135c58 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Fri, 20 Nov 2026 19:24:45 +0400 Subject: [PATCH 1/3] chore: install Infection with the Testo adapter Assisted-By: Claude Opus 5.5 --- composer.json | 14 ++++++++++++++ infection.json | 19 +++++++++++++++++++ vendor-bin/infection/.gitignore | 4 ++++ vendor-bin/infection/composer.json | 11 +++++++++++ 4 files changed, 48 insertions(+) create mode 100644 infection.json create mode 100644 vendor-bin/infection/.gitignore create mode 100644 vendor-bin/infection/composer.json diff --git a/composer.json b/composer.json index 21d64fa..7fd4970 100644 --- a/composer.json +++ b/composer.json @@ -71,12 +71,26 @@ "scripts": { "cs:diff": "php-cs-fixer fix --dry-run -v --diff --config=vendor-bin/code-style/.php-cs-fixer.dist.php", "cs:fix": "php-cs-fixer fix -v --config=vendor-bin/code-style/.php-cs-fixer.dist.php", + "infect": [ + "Composer\\Config::disableProcessTimeout", + "@putenv XDEBUG_MODE=coverage", + "infection --configuration=infection.json --threads=max" + ], + "infect:ci": [ + "Composer\\Config::disableProcessTimeout", + "@putenv XDEBUG_MODE=coverage", + "infection --ansi --configuration=infection.json --logger-github --threads=max --show-mutations=0" + ], "psalm": "psalm -c vendor-bin/psalm/psalm.xml", "psalm:baseline": "psalm -c vendor-bin/psalm/psalm.xml --set-baseline=vendor-bin/psalm/psalm-baseline.xml", "psalm:ci": "psalm -c vendor-bin/psalm/psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4", "test": "testo", "test:unit": "testo --suite=Unit" }, + "scripts-descriptions": { + "infect": "Run mutation testing with Infection against the Unit suite", + "infect:ci": "Run mutation testing in CI: GitHub annotations, the Stryker dashboard report and the MSI gate" + }, "config": { "sort-packages": true, "allow-plugins": { diff --git a/infection.json b/infection.json new file mode 100644 index 0000000..574f593 --- /dev/null +++ b/infection.json @@ -0,0 +1,19 @@ +{ + "$schema": "vendor-bin/infection/vendor/infection/infection/resources/schema.json", + "source": { + "directories": [ + "src" + ] + }, + "timeout": 10, + "minMsi": 86, + "minCoveredMsi": 86, + "testFramework": "testo", + "testFrameworkOptions": "--suite=Unit", + "tmpDir": "runtime", + "logs": { + "stryker": { + "report": "1.x" + } + } +} diff --git a/vendor-bin/infection/.gitignore b/vendor-bin/infection/.gitignore new file mode 100644 index 0000000..d4da745 --- /dev/null +++ b/vendor-bin/infection/.gitignore @@ -0,0 +1,4 @@ +/vendor/ +/composer.lock +/.*/ +/skills.json diff --git a/vendor-bin/infection/composer.json b/vendor-bin/infection/composer.json new file mode 100644 index 0000000..8436e13 --- /dev/null +++ b/vendor-bin/infection/composer.json @@ -0,0 +1,11 @@ +{ + "require": { + "infection/infection": "^0.35", + "testo/bridge-infection": "^0.1.9" + }, + "config": { + "allow-plugins": { + "infection/extension-installer": true + } + } +} From ffa40af69905dd40bd42acc65d72a88867cc7b36 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Fri, 20 Nov 2026 19:24:46 +0400 Subject: [PATCH 2/3] ci: run mutation testing through the shared cycle/gh-actions workflow Assisted-By: Claude Opus 5.5 --- .github/workflows/infection.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/infection.yml diff --git a/.github/workflows/infection.yml b/.github/workflows/infection.yml new file mode 100644 index 0000000..e9d5af7 --- /dev/null +++ b/.github/workflows/infection.yml @@ -0,0 +1,24 @@ +--- + +on: # yamllint disable-line rule:truthy + pull_request: + push: + branches: + - 1.x + +name: 🧬 Mutation Tests + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +permissions: + contents: read + +jobs: + infection: + name: Infection + uses: cycle/gh-actions/.github/workflows/infection.yml@master + secrets: inherit + +... From 65a45fb59ca3c47f763a17f4093f8ef42aa854a6 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Fri, 20 Nov 2026 19:24:47 +0400 Subject: [PATCH 3/3] docs: add the mutation testing badge Assisted-By: Claude Opus 5.5 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2c8ffdd..af0fc3b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ [![Psalm Level](https://shepherd.dev/github/cycle/schema-provider/level.svg)](https://shepherd.dev/github/cycle/schema-provider) [![Type Coverage](https://shepherd.dev/github/cycle/schema-provider/coverage.svg)](https://shepherd.dev/github/cycle/schema-provider) [![Codecov](https://img.shields.io/codecov/c/github/cycle/schema-provider/1.x?style=flat-square&logo=codecov)](https://codecov.io/gh/cycle/schema-provider) +[![Mutation testing badge](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fcycle%2Fschema-provider%2F1.x)](https://dashboard.stryker-mutator.io/reports/github.com/cycle/schema-provider/1.x)