ci: avoid heredoc in coverage summary

This commit is contained in:
Brad Stein 2026-01-22 14:39:33 -03:00
parent 0f46b57575
commit 35fae20d36

9
Jenkinsfile vendored
View File

@ -109,14 +109,7 @@ python -m slipcover \
--source ariadne \
--fail-under "${COVERAGE_MIN}" \
-m pytest -ra -vv --durations=20 --junitxml "${JUNIT_XML}"
python - <<'PY'
import json
with open("build/coverage.json", "r", encoding="utf-8") as handle:
payload = json.load(handle)
summary = payload.get("summary") or {}
percent = summary.get("percent_covered")
print(f"Coverage summary: {percent:.2f}%" if percent is not None else "Coverage summary unavailable")
PY
python -c "import json; payload=json.load(open('build/coverage.json', encoding='utf-8')); percent=(payload.get('summary') or {}).get('percent_covered'); print(f'Coverage summary: {percent:.2f}%' if percent is not None else 'Coverage summary unavailable')"
'''.stripIndent())
}
}