Skip to content

Commit 9c2eb2f

Browse files
Copilotkwerle
andauthored
Fix coverage extraction for SimpleCov's current output format (#124)
* Initial plan * Fix coverage extraction to work with SimpleCov's new format Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com>
1 parent fe288b9 commit 9c2eb2f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
fi
3434
3535
# Use sed for better portability - account for optional spaces after colon
36-
COVERAGE=$(sed -n 's/.*"coverage": *\([0-9.]*\).*/\1/p' coverage/.last_run.json | head -1)
36+
# SimpleCov format: { "result": { "line": 87.63 } }
37+
COVERAGE=$(sed -n 's/.*"line": *\([0-9.]*\).*/\1/p' coverage/.last_run.json | head -1)
3738
if [ -z "$COVERAGE" ]; then
3839
echo "Error: Could not extract coverage percentage"
3940
echo "Contents of coverage/.last_run.json:"

0 commit comments

Comments
 (0)