From cf1789545a25cc93bf92a7da5c42323f3db0d874 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 6 Aug 2025 12:16:16 +0100 Subject: [PATCH] ci: Surface lint and test results to comment It's a bit annoying how you have to go to the workflow result to see the lint error and test results. This surfaces it to the comment in the PR. --- .github/actions/lint-check/action.yml | 11 +++++++++-- .github/actions/test-summary/action.yml | 20 +++++++++++++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/actions/lint-check/action.yml b/.github/actions/lint-check/action.yml index 7c210f3ed..58d35f268 100644 --- a/.github/actions/lint-check/action.yml +++ b/.github/actions/lint-check/action.yml @@ -65,8 +65,15 @@ runs: ) echo "$summary" >> $GITHUB_STEP_SUMMARY - file="ci_summary.md" - echo "❌🛠️ \`clang-format\`: Lint errors, fix available." >> $file + pr_comment=$(cat <> $GITHUB_OUTPUT shell: bash diff --git a/.github/actions/test-summary/action.yml b/.github/actions/test-summary/action.yml index 5df9bb78b..f51d4faee 100644 --- a/.github/actions/test-summary/action.yml +++ b/.github/actions/test-summary/action.yml @@ -57,15 +57,25 @@ runs: if [ -z "$table" ]; then echo "No test results found" | tee $GITHUB_STEP_SUMMARY >&2 exit 1 - else - echo "$table" > $GITHUB_STEP_SUMMARY fi - count=$(echo "$table" | awk -v RS='' '{gsub(/[^❌]/, ""); print length}') - file="ci-summary.md" + echo "$table" > $GITHUB_STEP_SUMMARY + count=$(echo "$table" | awk -v RS='' '{gsub(/[^❌]/, ""); print length}') + + # Keep at this indentation level for heredoc. + fail_summary=$(cat <> $GITHUB_OUTPUT else # For debugging; don't send success to CI summary (reduce noise).