Skip to content

ci: run mutation testing with Infection - #18

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

roxblnfk merged 3 commits into
1.xfrom
ci/infection

Conversation

@roxblnfk

Copy link
Copy Markdown
Member

What was changed

Mutation testing runs with Infection through the Testo adapter (testo/bridge-infection).

  • Infection is installed in vendor-bin/infection; composer infect runs it locally, composer infect:ci in CI.
  • infection.json mutates src against the Unit, Feature/SQLite and Acceptance/SQLite suites, with minMsi / minCoveredMsi set to 54.
  • .github/workflows/infection.yml calls the shared cycle/gh-actions infection workflow; pushes to 1.x upload the report to the Stryker dashboard, and the README shows its badge.

Review notes

  • The adapter passes testFrameworkOptions to Testo as a single argument, so several --suite flags cannot be listed there; the infect scripts set DB_DRIVERS=sqlite instead, which registers only the SQLite suites next to Unit.
  • 406 of 966 mutants escape the current suites; the gate sits just below the measured score so CI catches a drop, and raising the score is left for follow-up work.
  • The workflow points at cycle/gh-actions@feat/infection (feat(infection): add a reusable workflow for mutation testing with Infection gh-actions#18) until that branch is merged.

Why?

The mutation score shows how much of the code the tests actually check, not only how much they execute.

Checklist

  • Tested
    • Infection passes locally: MSI 58% (covered MSI the same, mutation coverage 100%), about 3m 30s on 4 threads

The adapter hands testFrameworkOptions to Testo as a single argument, so several --suite flags cannot be listed there; DB_DRIVERS=sqlite in the scripts registers only the SQLite suites next to Unit, which CI runs without database servers.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk requested a review from a team November 20, 2026 15:25
@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 81.53%. Comparing base (9fff814) to head (6e39ffa).

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x      #18   +/-   ##
=======================================
  Coverage   81.53%   81.53%           
=======================================
  Files          43       43           
  Lines        1029     1029           
=======================================
  Hits          839      839           
  Misses        190      190           
Flag Coverage Δ
mysql 55.89% <ø> (ø)
postgres 55.40% <ø> (ø)
sqlite 54.51% <ø> (ø)
sqlserver 56.48% <ø> (ø)
unit 65.78% <ø> (ø)

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.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk merged commit 38868d1 into 1.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