diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index ea39123..a55f237 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -99,6 +99,29 @@ jobs: restore-keys: | nuget-${{ runner.os }}- - run: make mutation + # Job summary (#136): render each service's Stryker Markdown report on the run page (Gitea + # 1.27 $GITHUB_STEP_SUMMARY). `if: always()` so a ratchet break still reports — and because + # `make mutation` stops at the first break, the summary also shows exactly where it stopped. + # Guarded so it no-ops on a runner/server without summary support. Strips the report's UTF-8 BOM. + - name: Mutation score summary + if: always() + run: | + [ -n "${GITHUB_STEP_SUMMARY:-}" ] || exit 0 + { + echo "## 🧬 Mutation testing" + echo + for svc in acl event-subscriber domain bff; do + echo "### $svc" + echo + report=$(ls services/"$svc"/StrykerOutput/*/reports/mutation-report.md 2>/dev/null | sort | tail -1) + if [ -n "$report" ]; then + sed '1s/^\xef\xbb\xbf//' "$report" + else + echo "_No report — \`make mutation\` stopped before \`$svc\` (earlier ratchet break)._" + fi + echo + done + } >> "$GITHUB_STEP_SUMMARY" # Publish the Stryker HTML reports. `if: always()` uploads them even when the # ratchet fails — that is exactly when you want to inspect the survivors. # `continue-on-error` keeps the upload best-effort: the mutation *gate* is the diff --git a/services/acl/stryker-config.json b/services/acl/stryker-config.json index 0412cc4..c64e3d3 100644 --- a/services/acl/stryker-config.json +++ b/services/acl/stryker-config.json @@ -2,7 +2,7 @@ "stryker-config": { "solution": "Acl.slnx", "test-projects": ["Acl.Tests/Acl.Tests.csproj"], - "reporters": ["progress", "html"], + "reporters": ["progress", "html", "markdown"], "thresholds": { "high": 95, "low": 90, diff --git a/services/bff/stryker-config.json b/services/bff/stryker-config.json index fc3fe3c..46c8815 100644 --- a/services/bff/stryker-config.json +++ b/services/bff/stryker-config.json @@ -2,7 +2,7 @@ "stryker-config": { "solution": "Bff.slnx", "test-projects": ["Bff.Tests/Bff.Tests.csproj"], - "reporters": ["progress", "html"], + "reporters": ["progress", "html", "markdown"], "mutate": [ "!**/Program.cs", "!**/DownstreamClients.cs" diff --git a/services/domain/stryker-config.json b/services/domain/stryker-config.json index 3b51fae..c7ee5c3 100644 --- a/services/domain/stryker-config.json +++ b/services/domain/stryker-config.json @@ -2,7 +2,7 @@ "stryker-config": { "solution": "Big.slnx", "test-projects": ["Big.Tests/Big.Tests.csproj"], - "reporters": ["progress", "html"], + "reporters": ["progress", "html", "markdown"], "mutate": [ "!**/OpenZaakJobPump.cs", "!**/BeoordelingEscalatiePump.cs", diff --git a/services/event-subscriber/stryker-config.json b/services/event-subscriber/stryker-config.json index c99d4e4..00ea73e 100644 --- a/services/event-subscriber/stryker-config.json +++ b/services/event-subscriber/stryker-config.json @@ -2,7 +2,7 @@ "stryker-config": { "solution": "EventSubscriber.slnx", "test-projects": ["EventSubscriber.Tests/EventSubscriber.Tests.csproj"], - "reporters": ["progress", "html"], + "reporters": ["progress", "html", "markdown"], "thresholds": { "high": 95, "low": 90,