Skip to content

Commit

Permalink
Merge pull request #520 from ianhi/test-fail-bot
Browse files Browse the repository at this point in the history
add bot to comment when cron tests fail
  • Loading branch information
ianhi authored Feb 27, 2023
2 parents a39a31c + db85ac9 commit 9b85cab
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/TEST_FAIL_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "{{ env.TITLE }}"
labels: [bug]
---
<!-- Based on
https://github.com/pymmcore-plus/pymmcore-widgets/blob/5e233384e223ca00101ef4b741d3c525a5cff9c9/.github/TEST_FAIL_TEMPLATE.md
-->
The {{ workflow }} workflow failed on {{ date | date("YYYY-MM-DD HH:mm") }} UTC

The most recent failing test was on {{ env.os }} py{{ env.PYTHON }}, matplotlib version
{{ env.mpl-version }}
with commit: {{ sha }}

Full run: https://github.com/matplotlib/ipympl/actions/runs/{{ env.RUN_ID }}

(This post will be updated if another test fails, as long as this issue remains open.)
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,21 @@ jobs:
path: |
ui-tests/playwright-report
ui-tests/test-results
# If something goes wrong for the latests test cron job
# then open an issue in the repo
# This setup based on:
# https://github.com/pymmcore-plus/pymmcore-widgets/blob/5e233384e223ca00101ef4b741d3c525a5cff9c9/.github/workflows/cron.yml#L49
- name: Report Failures
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
MATPLOLIBT: ${{ matrix.mpl-version }}
RUN_ID: ${{ github.run_id }}
TITLE: '[test-bot] Scheduled Tests are failing'
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true

0 comments on commit 9b85cab

Please sign in to comment.