Skip to content

Commit fd9a5a6

Browse files
Removed actions yml for Discord and integrated it in the ci yml itself.
1 parent c8ac32b commit fd9a5a6

2 files changed

Lines changed: 78 additions & 61 deletions

File tree

.github/actions/discord-summary/action.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 78 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,32 @@ jobs:
142142
if: always()
143143

144144
- name: Send Results to Discord
145-
uses: ./.github/actions/discord-summary
146-
with:
147-
passed: ${{ steps.summary.outputs.passed }}
148-
failed: ${{ steps.summary.outputs.failed }}
149-
skipped: ${{ steps.summary.outputs.skipped }}
150-
total: ${{ steps.summary.outputs.total }}
151-
browser: ${{ matrix.browser }}
145+
run: |
146+
passed="${{ steps.summary.outputs.passed }}"
147+
failed="${{ steps.summary.outputs.failed }}"
148+
skipped="${{ steps.summary.outputs.skipped }}"
149+
total="${{ steps.summary.outputs.total }}"
150+
pass_percentage=$(awk "BEGIN {print ($passed/$total)*100}")
151+
fail_percentage=$(awk "BEGIN {print ($failed/$total)*100}")
152+
153+
content="-----------------------------------\n\n"
154+
content+="🛠️ **Job: ${{ github.job }}**\n"
155+
content+="👤 **User: ${{ github.actor }}**\n"
156+
content+="🌎 **Browser: ${{ matrix.browser }}**\n"
157+
content+="🎉 **Passed**: ${passed}\n"
158+
content+="❌ **Failed**: ${failed}\n"
159+
content+="⚠️ **Skipped**: ${skipped}\n"
160+
content+="📊 **Total**: ${total}\n\n"
161+
content+="✅ **Pass %**: ${pass_percentage}%\n"
162+
content+="❌ **Fail %**: ${fail_percentage}%\n\n"
163+
content+="-----------------------------------\n\n"
164+
165+
curl --location "$DISCORD_WEBHOOK_URL" \
166+
--header 'Content-Type: application/json' \
167+
--data-raw "{
168+
\"content\": \"$content\",
169+
\"username\": \"TestBot\"
170+
}"
152171
153172
regression_tests:
154173
name: Run Regression Tests
@@ -195,13 +214,32 @@ jobs:
195214
if: always()
196215

197216
- name: Send Results to Discord
198-
uses: ./.github/actions/discord-summary
199-
with:
200-
passed: ${{ steps.summary.outputs.passed }}
201-
failed: ${{ steps.summary.outputs.failed }}
202-
skipped: ${{ steps.summary.outputs.skipped }}
203-
total: ${{ steps.summary.outputs.total }}
204-
browser: ${{ matrix.browser }}
217+
run: |
218+
passed="${{ steps.summary.outputs.passed }}"
219+
failed="${{ steps.summary.outputs.failed }}"
220+
skipped="${{ steps.summary.outputs.skipped }}"
221+
total="${{ steps.summary.outputs.total }}"
222+
pass_percentage=$(awk "BEGIN {print ($passed/$total)*100}")
223+
fail_percentage=$(awk "BEGIN {print ($failed/$total)*100}")
224+
225+
content="-----------------------------------\n\n"
226+
content+="🛠️ **Job: ${{ github.job }}**\n"
227+
content+="👤 **User: ${{ github.actor }}**\n"
228+
content+="🌎 **Browser: ${{ matrix.browser }}**\n"
229+
content+="🎉 **Passed**: ${passed}\n"
230+
content+="❌ **Failed**: ${failed}\n"
231+
content+="⚠️ **Skipped**: ${skipped}\n"
232+
content+="📊 **Total**: ${total}\n\n"
233+
content+="✅ **Pass %**: ${pass_percentage}%\n"
234+
content+="❌ **Fail %**: ${fail_percentage}%\n\n"
235+
content+="-----------------------------------\n\n"
236+
237+
curl --location "$DISCORD_WEBHOOK_URL" \
238+
--header 'Content-Type: application/json' \
239+
--data-raw "{
240+
\"content\": \"$content\",
241+
\"username\": \"TestBot\"
242+
}"
205243
206244
e2e_tests:
207245
name: Run E2E Tests
@@ -252,10 +290,29 @@ jobs:
252290
if: always()
253291

254292
- name: Send Results to Discord
255-
uses: ./.github/actions/discord-summary
256-
with:
257-
passed: ${{ steps.summary.outputs.passed }}
258-
failed: ${{ steps.summary.outputs.failed }}
259-
skipped: ${{ steps.summary.outputs.skipped }}
260-
total: ${{ steps.summary.outputs.total }}
261-
browser: ${{ matrix.browser }}
293+
run: |
294+
passed="${{ steps.summary.outputs.passed }}"
295+
failed="${{ steps.summary.outputs.failed }}"
296+
skipped="${{ steps.summary.outputs.skipped }}"
297+
total="${{ steps.summary.outputs.total }}"
298+
pass_percentage=$(awk "BEGIN {print ($passed/$total)*100}")
299+
fail_percentage=$(awk "BEGIN {print ($failed/$total)*100}")
300+
301+
content="-----------------------------------\n\n"
302+
content+="🛠️ **Job: ${{ github.job }}**\n"
303+
content+="👤 **User: ${{ github.actor }}**\n"
304+
content+="🌎 **Browser: ${{ matrix.browser }}**\n"
305+
content+="🎉 **Passed**: ${passed}\n"
306+
content+="❌ **Failed**: ${failed}\n"
307+
content+="⚠️ **Skipped**: ${skipped}\n"
308+
content+="📊 **Total**: ${total}\n\n"
309+
content+="✅ **Pass %**: ${pass_percentage}%\n"
310+
content+="❌ **Fail %**: ${fail_percentage}%\n\n"
311+
content+="-----------------------------------\n\n"
312+
313+
curl --location "$DISCORD_WEBHOOK_URL" \
314+
--header 'Content-Type: application/json' \
315+
--data-raw "{
316+
\"content\": \"$content\",
317+
\"username\": \"TestBot\"
318+
}"

0 commit comments

Comments
 (0)