From 07334054b0aa76f0ce6d8abe555fc61d31ad4ca2 Mon Sep 17 00:00:00 2001 From: Michael Ekstrand Date: Wed, 24 Jul 2024 10:58:49 -0400 Subject: [PATCH] improve test report coverage --- .github/workflows/test.yml | 1 + lkdev/workflows/test.py | 1 + utils/coverage-log.tcl | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78f896975..ee98944c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/lkdev/workflows/test.py b/lkdev/workflows/test.py index 20360838d..7a345e803 100644 --- a/lkdev/workflows/test.py +++ b/lkdev/workflows/test.py @@ -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 """), diff --git a/utils/coverage-log.tcl b/utils/coverage-log.tcl index c7244e308..c4d8f68dd 100755 --- a/utils/coverage-log.tcl +++ b/utils/coverage-log.tcl @@ -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