Skip to content

ci: add mutation testing - #21

Merged
roxblnfk merged 1 commit into
masterfrom
ci/mutation-testing
Oct 9, 2026
Merged

roxblnfk merged 1 commit into
masterfrom
ci/mutation-testing

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Infection runs on every PR and on pushes to master (PHP 8.4, Xdebug); pushes to master send the report to the Stryker dashboard, and the README shows its badge.
  • Covered Code MSI in CI is 83%, so --min-msi=80.
  • Only the Unit suite runs under Infection: acceptance tests start php-cs-fixer in a subprocess, so they collect no coverage and cannot kill a mutant.
  • src/Rules/DefaultRules.php is excluded from mutation: it is a rule list, and killing "drop rule X" mutants would need a test that duplicates the list.

Why?

Line coverage shows what tests execute; mutation testing shows what they actually check.

Review notes

  • Infection is installed in the job (infection/infection + testo/bridge-infection), not from the Phar and not in composer.json: the Phar's bundled Testo adapter writes an unscoped class into the mutant bootstrap and every mutant fails with "class not found", and Infection needs PHP 8.3+.

Checklist

  • Closes: no issue
  • Tested
    • Infection runs locally and in CI
    • Unit tests added

@roxblnfk
roxblnfk force-pushed the ci/mutation-testing branch 2 times, most recently from 578ae43 to 2df11bd Compare October 9, 2026 22:11
`--min-msi=80` is the CI result (83%) rounded down to 5.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk force-pushed the ci/mutation-testing branch from 2df11bd to 0dcb279 Compare October 9, 2026 22:13
@roxblnfk
roxblnfk marked this pull request as ready for review October 9, 2026 22:13
@roxblnfk
roxblnfk merged commit 3df7476 into master Oct 9, 2026
8 of 9 checks passed
@roxblnfk
roxblnfk deleted the ci/mutation-testing branch October 9, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant