Skip to content

Commit

Permalink
add bot to comment when cron tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhi committed Feb 23, 2023
1 parent a39a31c commit db85ac9
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 db85ac9

Please sign in to comment.