Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,6 +63,16 @@ on:
type: string
required: false
default: ""
min-msi:
description: "Minimum Mutation Score Indicator (%) required to pass the mutation-test job."
type: string
required: false
default: "10"
min-covered-msi:
description: "Minimum covered-code MSI (%) required to pass the mutation-test job."
type: string
required: false
default: "10"
secrets:
CODECOV_TOKEN:
required: false
Expand DownExpand Up@@ -255,4 +265,4 @@ jobs:
- name: Mutation testing
env:
INFECTION_DASHBOARD_API_KEY: ${{ secrets.INFECTION_DASHBOARD_API_KEY }}
run: composer mutation-test
run: composer mutation-test -- --min-msi=${{ inputs.min-msi }} --min-covered-msi=${{ inputs.min-covered-msi }} --logger-github
12 changes: 12 additions & 0 deletions docs/workflow-architecture.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,6 +128,16 @@ generated by registering the repo at dashboard.stryker-mutator.io). Either
var name. **Must be passed as an `env:` block on the `run:` step, not as a
`with:` input** — Infection reads it from the environment, not a CLI flag.

`min-msi` / `min-covered-msi` (both default `"10"`) control the MSI
threshold that fails the job — config-based per repo, not hardcoded. Default
is deliberately low: most php-db repos are legacy codebases just adopting
mutation testing, and a strict bar (e.g. message-bus's 90/90) would fail
immediately. Each consuming repo overrides these once it has a real
baseline MSI to ratchet up from. Passed as `composer mutation-test --
--min-msi=... --min-covered-msi=... --logger-github` (the composer script
itself stays plain `infection`, flags are appended at invocation time, same
pattern as message-bus).

## Secrets

Because `CODECOV_TOKEN` is org-scoped and `INFECTION_DASHBOARD_API_KEY` is
Expand All@@ -150,6 +160,8 @@ within the same GitHub org.
| `enable-codecov` | Turns on the `codecov` job. |
| `enable-infection` | Turns on the `mutation-test` job. |
| `coverage-php-version` | Which matrix leg is canonical for coverage/mutation. |
| `min-msi` | Minimum MSI (%) required to pass `mutation-test` (default `"10"`, config-based per repo). |
| `min-covered-msi` | Minimum covered-code MSI (%) required to pass `mutation-test` (default `"10"`, config-based per repo). |

Plus `secrets: CODECOV_TOKEN`, `INFECTION_DASHBOARD_API_KEY` on
`workflow_call` (both `required: false`).
Expand Down