Skip to content
Closed
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
8 changes: 6 additions & 2 deletions .github/scripts/coverage_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sys

PATCH_THRESHOLD = 80
TOTAL_THRESHOLD = 80


def get_total_coverage(coverage_json_path="coverage.json"):
Expand Down Expand Up @@ -175,9 +176,12 @@ def run_ci():

create_check_run(
name="Total Coverage",
conclusion="success",
conclusion="success" if total_pct >= TOTAL_THRESHOLD else "failure",
title=f"Total Coverage: {total_pct:.1f}%",
summary=f"Overall project test coverage is **{total_pct:.1f}%**.",
summary=(
f"Overall project test coverage is **{total_pct:.1f}%** "
f"(threshold: {TOTAL_THRESHOLD}%)."
),
)

patch_conclusion = "success" if patch_pct >= PATCH_THRESHOLD else "failure"
Expand Down
Loading