Skip to content

Commit

Permalink
improve test report coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jul 24, 2024
1 parent 907701f commit 0733405
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ jobs:
coverage.xml |tee diff-cover.txt
- name: ± Measure and report coverage
run: |
echo $PR_NUMBER > ./lenskit-coverage/pr-number
tclsh ./utils/coverage-log.tcl
cat lenskit-coverage/report.md >$GITHUB_STEP_SUMMARY
- name: 📤 Upload coverage report
Expand Down
1 change: 1 addition & 0 deletions lkdev/workflows/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ def jobs_result(deps: list[str]) -> GHJob:
{
"name": "± Measure and report coverage",
"run": script("""
echo $PR_NUMBER > ./lenskit-coverage/pr-number
tclsh ./utils/coverage-log.tcl
cat lenskit-coverage/report.md >$GITHUB_STEP_SUMMARY
"""),
Expand Down
1 change: 1 addition & 0 deletions utils/coverage-log.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ if {[ev GITHUB_BASE_REF base]} {

# write the coverage report
set reph [open lenskit-coverage/report.md w]
puts $reph "The GitHub 🤖 has run the tests on your PR.\n"
puts $reph [format
"Covered **%.2f%%** of diff (coverage changed **%.2f%%** from %.2f%% to %.2f%%).\n"
$diff_cov $cov_change $prev_cov $cur_cov
Expand Down

0 comments on commit 0733405

Please sign in to comment.