We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f78fea commit c4ca893Copy full SHA for c4ca893
1 file changed
.github/workflows/coverage.yml
@@ -80,8 +80,9 @@ jobs:
80
- name: Generate coverage report data
81
id: cov
82
run: |
83
- # Extract total coverage
84
- pct=$(jq -r '(.data[0].totals.lines.percent // 0)' coverage.json)
+ # Extract total coverage and round to 2 decimal places
+ pct_raw=$(jq -r '(.data[0].totals.lines.percent // 0)' coverage.json)
85
+ pct=$(printf "%.2f" "$pct_raw")
86
covered=$(jq -r '(.data[0].totals.lines.covered // 0)' coverage.json)
87
total=$(jq -r '(.data[0].totals.lines.count // 0)' coverage.json)
88
echo "pct=$pct" >> "$GITHUB_OUTPUT"
0 commit comments