ci: render mutation scores in the run summary (refs #136)
This commit is contained in:
@@ -99,6 +99,29 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
nuget-${{ runner.os }}-
|
nuget-${{ runner.os }}-
|
||||||
- run: make mutation
|
- 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
|
# Publish the Stryker HTML reports. `if: always()` uploads them even when the
|
||||||
# ratchet fails — that is exactly when you want to inspect the survivors.
|
# 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
|
# `continue-on-error` keeps the upload best-effort: the mutation *gate* is the
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"stryker-config": {
|
"stryker-config": {
|
||||||
"solution": "Acl.slnx",
|
"solution": "Acl.slnx",
|
||||||
"test-projects": ["Acl.Tests/Acl.Tests.csproj"],
|
"test-projects": ["Acl.Tests/Acl.Tests.csproj"],
|
||||||
"reporters": ["progress", "html"],
|
"reporters": ["progress", "html", "markdown"],
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"high": 95,
|
"high": 95,
|
||||||
"low": 90,
|
"low": 90,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"stryker-config": {
|
"stryker-config": {
|
||||||
"solution": "Bff.slnx",
|
"solution": "Bff.slnx",
|
||||||
"test-projects": ["Bff.Tests/Bff.Tests.csproj"],
|
"test-projects": ["Bff.Tests/Bff.Tests.csproj"],
|
||||||
"reporters": ["progress", "html"],
|
"reporters": ["progress", "html", "markdown"],
|
||||||
"mutate": [
|
"mutate": [
|
||||||
"!**/Program.cs",
|
"!**/Program.cs",
|
||||||
"!**/DownstreamClients.cs"
|
"!**/DownstreamClients.cs"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"stryker-config": {
|
"stryker-config": {
|
||||||
"solution": "Big.slnx",
|
"solution": "Big.slnx",
|
||||||
"test-projects": ["Big.Tests/Big.Tests.csproj"],
|
"test-projects": ["Big.Tests/Big.Tests.csproj"],
|
||||||
"reporters": ["progress", "html"],
|
"reporters": ["progress", "html", "markdown"],
|
||||||
"mutate": [
|
"mutate": [
|
||||||
"!**/OpenZaakJobPump.cs",
|
"!**/OpenZaakJobPump.cs",
|
||||||
"!**/BeoordelingEscalatiePump.cs",
|
"!**/BeoordelingEscalatiePump.cs",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"stryker-config": {
|
"stryker-config": {
|
||||||
"solution": "EventSubscriber.slnx",
|
"solution": "EventSubscriber.slnx",
|
||||||
"test-projects": ["EventSubscriber.Tests/EventSubscriber.Tests.csproj"],
|
"test-projects": ["EventSubscriber.Tests/EventSubscriber.Tests.csproj"],
|
||||||
"reporters": ["progress", "html"],
|
"reporters": ["progress", "html", "markdown"],
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"high": 95,
|
"high": 95,
|
||||||
"low": 90,
|
"low": 90,
|
||||||
|
|||||||
Reference in New Issue
Block a user