Skip to content

Commit 9b85cab

Browse files
authored
Merge pull request #520 from ianhi/test-fail-bot
add bot to comment when cron tests fail
2 parents a39a31c + db85ac9 commit 9b85cab

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/TEST_FAIL_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "{{ env.TITLE }}"
3+
labels: [bug]
4+
---
5+
<!-- Based on
6+
https://github.com/pymmcore-plus/pymmcore-widgets/blob/5e233384e223ca00101ef4b741d3c525a5cff9c9/.github/TEST_FAIL_TEMPLATE.md
7+
-->
8+
The {{ workflow }} workflow failed on {{ date | date("YYYY-MM-DD HH:mm") }} UTC
9+
10+
The most recent failing test was on {{ env.os }} py{{ env.PYTHON }}, matplotlib version
11+
{{ env.mpl-version }}
12+
with commit: {{ sha }}
13+
14+
Full run: https://github.com/matplotlib/ipympl/actions/runs/{{ env.RUN_ID }}
15+
16+
(This post will be updated if another test fails, as long as this issue remains open.)

.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,21 @@ jobs:
138138
path: |
139139
ui-tests/playwright-report
140140
ui-tests/test-results
141+
142+
# If something goes wrong for the latests test cron job
143+
# then open an issue in the repo
144+
# This setup based on:
145+
# https://github.com/pymmcore-plus/pymmcore-widgets/blob/5e233384e223ca00101ef4b741d3c525a5cff9c9/.github/workflows/cron.yml#L49
146+
- name: Report Failures
147+
if: failure() && github.event_name == 'schedule'
148+
uses: JasonEtco/create-an-issue@v2
149+
env:
150+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151+
OS: ${{ matrix.os }}
152+
PYTHON: ${{ matrix.python }}
153+
MATPLOLIBT: ${{ matrix.mpl-version }}
154+
RUN_ID: ${{ github.run_id }}
155+
TITLE: '[test-bot] Scheduled Tests are failing'
156+
with:
157+
filename: .github/TEST_FAIL_TEMPLATE.md
158+
update_existing: true

0 commit comments

Comments
 (0)