summaryrefslogtreecommitdiffstats
path: root/.github/scripts
diff options
context:
space:
mode:
authorKirill Rysin <[email protected]>2026-06-11 15:18:05 +0200
committerGitHub <[email protected]>2026-06-11 15:18:05 +0200
commitc3fc900507332e2aa6127f6bba699f34df34a435 (patch)
tree980d1063b2d65518f2400f16ec53b2115274b96a /.github/scripts
parent3734f31b49986282e0b64795462890b25f25d7ae (diff)
Revert "add cpp sdk code coverage action to the ci" (#43243)
Diffstat (limited to '.github/scripts')
-rwxr-xr-x.github/scripts/tests/compare_cpp_sdk_coverage.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/.github/scripts/tests/compare_cpp_sdk_coverage.py b/.github/scripts/tests/compare_cpp_sdk_coverage.py
deleted file mode 100755
index 13b6f6c8561..00000000000
--- a/.github/scripts/tests/compare_cpp_sdk_coverage.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python3
-import json
-import re
-import sys
-from pathlib import Path
-
-
-def line_pct(report_dir: str) -> float:
- html = (Path(report_dir) / "index.html").read_text(encoding="utf-8", errors="replace")
- match = re.search(r"Lines:</td>\s*<td[^>]*>([\d.]+)\s*%", html, re.I)
- if not match:
- raise SystemExit(f"line coverage not found in {report_dir}/index.html")
- return float(match.group(1))
-
-
-if __name__ == "__main__":
- if len(sys.argv) < 2:
- raise SystemExit("usage: compare_cpp_sdk_coverage.py {extract|check} ...")
-
- cmd = sys.argv[1]
- if cmd == "extract":
- if len(sys.argv) != 4:
- raise SystemExit("usage: compare_cpp_sdk_coverage.py extract <report_dir> <out_json>")
- with open(sys.argv[3], "w", encoding="utf-8") as f:
- json.dump({"line_pct": line_pct(sys.argv[2])}, f)
- elif cmd == "check":
- if len(sys.argv) != 4:
- raise SystemExit("usage: compare_cpp_sdk_coverage.py check <current_json> <baseline_json>")
- with open(sys.argv[2], encoding="utf-8") as f:
- current = json.load(f)["line_pct"]
- with open(sys.argv[3], encoding="utf-8") as f:
- baseline = json.load(f)["line_pct"]
- print(f"CPP SDK line coverage: {current}% (baseline: {baseline}%)", file=sys.stderr)
- sys.exit(1 if current < baseline else 0)
- else:
- raise SystemExit(f"unknown command: {cmd}")