Config-based MSI threshold + test-env-json override for mutation-test/test jobs - #5
Merged
Merged
Conversation
Adds min-msi / min-covered-msi inputs (default "10") to the shared mutation-test job, passed as --min-msi/--min-covered-msi flags at invocation time (composer script itself stays plain 'infection'). Config-based per repo rather than hardcoded, since php-db repos are legacy codebases just adopting mutation testing and most don't have a baseline MSI yet. Default is deliberately low so the first real run doesn't fail outright; each repo raises it once it has a real score to ratchet up from.
This was referenced Aug 10, 2026
tyrsson
added a commit
that referenced
this pull request
Aug 10, 2026
Add test-env-json input (follow-up to #5, missed in that merge)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
min-msi/min-covered-msiinputs (default"10") to the sharedmutation-testjob, passed as--min-msi/--min-covered-msiflags at invocation time. Config-based per repo (php-db repos are legacy codebases just adopting mutation testing, most don't have a baseline MSI yet; a strict bar like message-bus's 90/90 would fail immediately).test-env-jsoninput (JSON object) exported via$GITHUB_ENVbefore running tests in bothtestandmutation-test. Lets a caller override aphpunit.xml.distconnection setting for CI (e.g. a DB hostname that needs to differ between local Docker Compose networking and CI's non-containerized job) without editing that file.Why (test-env-json)
Found via phpdb-mysql's first real CI run: integration tests failed on every leg with
getaddrinfo for mysql failed: Temporary failure in name resolution. Root cause: thetest/mutation-testjobs run directly on the runner VM (nocontainer:key), so the DB started by the manualdocker runstep is only reachable via127.0.0.1+ the mapped port, not the container name — confirmed by GitHub's own docs on service containers. phpdb-mysql'sphpunit.xml.distdefaultsTESTS_PHPDB_ADAPTER_MYSQL_HOSTNAMEtomysqlfor local Docker Compose dev (container-to-container, works fine there). Also confirmed via PHPUnit's docs:<env>does not override an already-set real env var unlessforce="true", so setting the real env var in CI viatest-env-jsoncorrectly takes precedence without needingforce(which would break local dev).