Skip to content

Commit 33ccedd

Browse files
Copilotkwerle
andcommitted
Fix coverage extraction to work with SimpleCov's new format
Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com>
1 parent 1fafbc9 commit 33ccedd

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)