Skip to content

Commit d64cd6e

Browse files
committed
chore(ci): Open issue if prerelease tests fail
1 parent 93963eb commit d64cd6e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/prerelease.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
- name: Show tox config
5757
run: tox c
5858
- name: Run tox
59+
id: pre
5960
run: tox -v --exit-and-dump-after 1200
6061
- uses: codecov/codecov-action@v5
6162
with:
@@ -67,3 +68,20 @@ jobs:
6768
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.dependencies }}
6869
path: test-results.xml
6970
if: always()
71+
- name: Create issue
72+
# Workflows triggered by schedule only notify the workflow creator
73+
# So let's open an issue to make sure this is visible to all
74+
if: ${{ steps.pre.outcome != 'success' }}
75+
uses: JasonEtco/[email protected]
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
run_id: ${{ github.run_id }}
79+
repository: ${{ github.repository }}
80+
workflow_name: PRE-RELEASE TESTS
81+
with:
82+
filename: .github/workflow_failure.md
83+
update_existing: true
84+
search_existing: open
85+
- name: Return failure
86+
if: ${{ steps.pre.outcome != 'success' }}
87+
run: exit 1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: ":rotating_light: {{ env.workflow_name }}: failure"
3+
---
4+
5+
The run `{{ env.run_id }}` of the workflow {{ env.workflow_name }} failed.
6+
7+
You can view [the log](https://github.com/{{ env.repository }}/actions/runs/{{ env.run_id }})

0 commit comments

Comments
 (0)