Skip to content

Commit

Permalink
Update test-coverage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mrugama authored Feb 16, 2025
1 parent 1224889 commit 4742c47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ jobs:
echo "[![Test Coverage]($COVERAGE_BADGE_URL)](https://github.com/mrugama/Weather/actions)" >> coverage_section.md
echo "" >> coverage_section.md
echo "---" >> coverage_section.md
# Group files by target and generate coverage breakdown
echo "### 📄 File-wise Coverage Breakdown by Target" >> coverage_section.md
jq -r '.targets[] | "### \(.name)\n| File | Covered Lines | Executable Lines | Coverage |\n|------|--------------|-----------------|----------|\n" + (.files[] | "| \(.name) | \(.coveredLines) | \(.executableLines) | [![Coverage]($(generate_badge \((.lineCoverage * 100) | round))](https://github.com/mrugama/Weather/actions) |") + "\n"' coverage.json >> coverage_section.md
echo "### 📄 File-wise Coverage Breakdown" >> coverage_section.md
echo "| File | Covered Lines | Executable Lines | Coverage |" >> coverage_section.md
echo "|------|--------------|-----------------|----------|" >> coverage_section.md
# Loop through each file in coverage.json and add to table
jq -r '.targets[].files[] | "| \(.name) | \(.coveredLines) | \(.executableLines) | [![Coverage]($(generate_badge \((.lineCoverage * 100) | round))](https://github.com/mrugama/Weather/actions) |"' coverage.json >> coverage_section.md
echo "---" >> coverage_section.md
echo "" >> coverage_section.md
Expand Down

0 comments on commit 4742c47

Please sign in to comment.