Skip to content

Commit

Permalink
Merge pull request #323 from jeertmans/master
Browse files Browse the repository at this point in the history
chore(ci): print benchmarks to github step summary when fail to comment
  • Loading branch information
jeertmans authored Jun 27, 2023
2 parents e2702f6 + b303721 commit 82776c7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/rustbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,25 @@ jobs:
echo 'results<<EOF' >> $GITHUB_OUTPUT
critcmp before changes >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
id: compare

- name: Comment PR with execution number
- name: Comment PR with benchmarks
uses: thollander/actions-comment-pull-request@v2
continue-on-error: true
with:
message: |
Benchmark results:
```
${{ steps.compare.outputs.results }}
```
comment_tag: benchmarks

id: comment

- name: If PR comment failed, write to PR summary
if: steps.comment.outcome != 'success'
run: |
echo '### Benchmark results' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '${{ steps.compare.outputs.results }}' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

0 comments on commit 82776c7

Please sign in to comment.