Skip to content

Commit 95bc043

Browse files
ci: failing notifications improvement (#1243)
Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com>
1 parent 0da0d3b commit 95bc043

File tree

2 files changed

+47
-6
lines changed

2 files changed

+47
-6
lines changed

.github/workflows/nightly_docker_test.yml

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
workflow_dispatch:
44
schedule: # UTC at 0300
55
- cron: "0 3 * * *"
6+
# Trigger workflow when file is modified
7+
push:
8+
paths:
9+
- '.github/workflows/nightly_docker_test.yml'
610

711
env:
812
MAIN_PYTHON_VERSION: '3.12'
@@ -104,9 +108,27 @@ jobs:
104108
if: failure()
105109
with:
106110
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
107-
needs: ${{ toJson(needs) }}
108-
job: ${{ toJson(job) }}
109-
steps: ${{ toJson(steps) }}
111+
# Message to send to Teams as a webhook notification in JSON Payload format
112+
raw: >-
113+
{
114+
"@type": "MessageCard",
115+
"@context": "http://schema.org/extensions",
116+
"summary": "Nightly Tests for Windows failing",
117+
"themeColor": "f44336",
118+
"title": "PyAnsys Geometry Nightly Tests - Windows failing",
119+
"sections": [
120+
{
121+
"activityTitle": "Windows nightly tests are failing",
122+
"activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
123+
"facts": [
124+
{
125+
"name": "Status",
126+
"value": "Failed"
127+
}
128+
]
129+
}
130+
]
131+
}
110132
111133
# =================================================================================================
112134
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -150,6 +172,24 @@ jobs:
150172
if: failure()
151173
with:
152174
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
153-
needs: ${{ toJson(needs) }}
154-
job: ${{ toJson(job) }}
155-
steps: ${{ toJson(steps) }}
175+
# Message to send to Teams as a webhook notification in JSON Payload format
176+
raw: >-
177+
{
178+
"@type": "MessageCard",
179+
"@context": "http://schema.org/extensions",
180+
"summary": "Nightly Tests for Linux failing",
181+
"themeColor": "f44336",
182+
"title": "PyAnsys Geometry Nightly Tests - Linux failing",
183+
"sections": [
184+
{
185+
"activityTitle": "Linux nightly tests are failing",
186+
"activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
187+
"facts": [
188+
{
189+
"name": "Status",
190+
"value": "Failed"
191+
}
192+
]
193+
}
194+
]
195+
}

doc/changelog.d/1243.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ci: failing notifications improvement

0 commit comments

Comments
 (0)