Skip to content

Commit c4ca893

Browse files
committed
[update] formatting to only show 2 digits.
1 parent 0f78fea commit c4ca893

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080
- name: Generate coverage report data
8181
id: cov
8282
run: |
83-
# Extract total coverage
84-
pct=$(jq -r '(.data[0].totals.lines.percent // 0)' coverage.json)
83+
# Extract total coverage and round to 2 decimal places
84+
pct_raw=$(jq -r '(.data[0].totals.lines.percent // 0)' coverage.json)
85+
pct=$(printf "%.2f" "$pct_raw")
8586
covered=$(jq -r '(.data[0].totals.lines.covered // 0)' coverage.json)
8687
total=$(jq -r '(.data[0].totals.lines.count // 0)' coverage.json)
8788
echo "pct=$pct" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)