Skip to content

Commit 56ac429

Browse files
jc-sumoclaude
andcommitted
Fix coverage badge automation
Wire up Gist ID, adjust coverage color thresholds to match project standards (green ≥90%, yellow ≥80%, orange ≥50%, red <50%), and add coverage badge to README. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent efd667b commit 56ac429

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: schneegans/dynamic-badges-action@v1.7.0
4343
with:
4444
auth: ${{ secrets.GIST_SECRET }}
45-
gistID: REPLACE_WITH_GIST_ID
45+
gistID: 6d3725acf17134aee954b139dd60d316
4646
filename: pysigma-backend-sumologic-coverage.json
4747
label: Coverage
4848
message: ${{ env.COVERAGE }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![PyPI](https://img.shields.io/pypi/v/pysigma-backend-sumologic)](https://pypi.org/project/pysigma-backend-sumologic/)
55
![Python](https://img.shields.io/pypi/pyversions/pysigma-backend-sumologic)
66
![License](https://img.shields.io/github/license/SumoLogic/pySigma-backend-sumologic)
7+
![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jc-sumo/6d3725acf17134aee954b139dd60d316/raw/pysigma-backend-sumologic-coverage.json)
78

89
## Overview
910

print-coverage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
root = tree.getroot()
66
coverage = float(root.attrib["line-rate"]) * 100
77
print(f"COVERAGE={coverage:3.4}%")
8-
if coverage >= 95.0:
8+
if coverage >= 90.0:
99
print("COVERAGE_COLOR=green")
10-
elif coverage >= 90.0:
10+
elif coverage >= 80.0:
1111
print("COVERAGE_COLOR=yellow")
12-
elif coverage >= 85.0:
12+
elif coverage >= 50.0:
1313
print("COVERAGE_COLOR=orange")
1414
else:
1515
print("COVERAGE_COLOR=red")

0 commit comments

Comments
 (0)