From db85ac91e94c49c0ecacec024006ba5e321645fe Mon Sep 17 00:00:00 2001 From: Ian Hunt-Isaak Date: Thu, 23 Feb 2023 18:45:39 -0500 Subject: [PATCH] add bot to comment when cron tests fail --- .github/TEST_FAIL_TEMPLATE.md | 16 ++++++++++++++++ .github/workflows/main.yml | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/TEST_FAIL_TEMPLATE.md diff --git a/.github/TEST_FAIL_TEMPLATE.md b/.github/TEST_FAIL_TEMPLATE.md new file mode 100644 index 00000000..c7345a06 --- /dev/null +++ b/.github/TEST_FAIL_TEMPLATE.md @@ -0,0 +1,16 @@ +--- +title: "{{ env.TITLE }}" +labels: [bug] +--- + +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.) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2417e288..1d98c83b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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