Skip to content

Commit

Permalink
Warn via issue if overnight benchmarks fail (#5432)
Browse files Browse the repository at this point in the history
* Include a warning step for overnight benchmarking.

* Fix for failure warning script.

* Better formatting of warning issue title.

* What's new entry.
  • Loading branch information
trexfeathers committed Aug 18, 2023
1 parent cdbec50 commit e5a45c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/benchmarks_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
python benchmarks/bm_runner.py branch origin/${{ github.base_ref }}
- name: Run overnight benchmarks
id: overnight
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -99,6 +100,17 @@ jobs:
python benchmarks/bm_runner.py overnight $first_commit
fi
- name: Warn of failure
if: >
failure() &&
steps.overnight.outcome == 'failure'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
title="Overnight benchmark workflow failed: \`${{ github.run_id }}\`"
body="Generated by GHA run [\`${{github.run_id}}\`](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
gh issue create --title "$title" --body "$body" --label "Bot" --label "Type: Performance" --repo $GITHUB_REPOSITORY
- name: Upload any benchmark reports
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ This document explains the changes made to Iris for this release
of how the pull request changes affect performance. (feature branch:
:pull:`5431`)

#. `@trexfeathers`_ added a catch to the overnight benchmark workflow to raise
an issue if the overnight run fails - this was previously an 'invisible'
problem. (feature branch: :pull:`5432`)


.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
Expand Down

0 comments on commit e5a45c2

Please sign in to comment.