Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
body-includes: "<!-- pr-comment -->"

# If 'pr' workflow run was 'requested'...
- if: github.event.action == 'requested'
- if: github.event.action == 'requested' && steps.find-comment.outputs.comment-id != ''
name: PR workflow started - Update Comment
uses: peter-evans/create-or-update-comment@v5
with:
Expand All @@ -52,8 +52,9 @@ jobs:
<!-- pr-comment -->
Waiting for [build job](https://github.com/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}) (at ${{ github.event.workflow_run.head_sha }})...

# If 'pr' workflow run was 'completed'...
- if: github.event.action == 'completed'
# If 'pr' workflow run was 'completed' (but not 'cancelled', that usually means a new job is
# running, and we don't want to race with it)...
- if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'cancelled'
name: PR workflow completed - Download pr-comment-body.txt
uses: actions/download-artifact@v4
continue-on-error: true
Expand All @@ -62,7 +63,7 @@ jobs:
repository: ${{ github.event.workflow_run.repository.full_name }}
run-id: ${{ github.event.workflow_run.id }}
name: pr-comment-body.txt
- if: github.event.action == 'completed'
- if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'cancelled'
name: PR workflow completed - Create pr-comment.txt
env:
REPO: ${{github.repository}}
Expand All @@ -84,8 +85,8 @@ jobs:
echo '(No pr-comment-body.txt artifact found from this job.)'
fi
) > pr-comment.txt
- if: github.event.action == 'completed'
name: PR workflow completed - Update Comment
- if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'cancelled'
name: PR workflow completed - Post or Update Comment
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ steps.pr-context.outputs.number }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ jobs:
diff --unified=0 case-count-report-{before,after}.txt | grep '^[+-][^+-]' | tee case-count-report-diff.txt
(
echo '```diff'
if [[ "$(wc -l < case-count-report-diff.txt)" -le 20 ]] ; then
line_count=$(wc -l < case-count-report-diff.txt)
if [[ "${line_count}" -eq 0 ]] ; then
echo ' Test case/subcase counts did not change.'
elif [[ "${line_count}" -le 20 ]] ; then
cat case-count-report-diff.txt
else
head -n18 case-count-report-diff.txt
echo '[snip - full report in action logs]'
echo ' [snip - full report in action logs]'
tail -n2 case-count-report-diff.txt
fi
echo '```'
Expand Down