Skip to content

ci: run mutation testing with Infection - #141

Merged
roxblnfk merged 3 commits into
4.xfrom
ci/infection
Nov 20, 2026
Merged

roxblnfk merged 3 commits into
4.xfrom
ci/infection

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Mutation testing runs in CI through the shared cycle/gh-actions Infection workflow, on pull requests and on pushes to 4.x; pushes to 4.x publish the report to the Stryker dashboard, and the README shows its badge.
  • The old PHPUnit-era infection.json now uses the Testo adapter (testo/bridge-infection, installed in vendor-bin/infection) and mutates src against the suites that need no database server: Unit, Feature/SQLite and Regression/SQLite (DB_DRIVERS=sqlite). composer infect runs it locally, composer infect:ci in CI; both fail below 80% MSI / covered MSI.

Why?

  • Mutation testing on the package with a published score, like the other Cycle packages.

Review notes

  • Measure the score on Linux: a local run on Windows reports a higher MSI, because some surviving mutants come back as killed there.

Checklist

  • Tested
    • Tested manually: 487 mutants, MSI 82%, covered MSI 82%, in a Linux container and in CI (about 3 minutes)
    • Unit tests added

Infection runs with DB_DRIVERS=sqlite, so cycle/testing registers only the Unit and SQLite suites, the ones CI can run without database servers.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk requested a review from a team November 20, 2026 15:56
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.28%. Comparing base (8dae473) to head (ace8bc3).
⚠️ Report is 2 commits behind head on 4.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              4.x     #141   +/-   ##
=======================================
  Coverage   87.28%   87.28%           
=======================================
  Files          39       39           
  Lines         873      873           
=======================================
  Hits          762      762           
  Misses        111      111           
Flag Coverage Δ
mysql 90.65% <ø> (ø)
postgres 90.77% <ø> (ø)
sqlite 90.65% <ø> (ø)
sqlserver 90.65% <ø> (ø)
unit 12.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roxblnfk
roxblnfk merged commit 5b0ae8e into 4.x Nov 20, 2026
22 checks passed
@roxblnfk
roxblnfk deleted the ci/infection branch November 20, 2026 16:01
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