mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 23:07:08 +01:00
report failed tests to slack
This commit is contained in:
parent
dd70238216
commit
7cb3970161
4 changed files with 39 additions and 6 deletions
16
src/main.ts
16
src/main.ts
|
|
@ -328,6 +328,22 @@ class TestReporter {
|
|||
text: `:red_circle: ${tr.failed} in <${resp.data.html_url}#r${runIndex}|${runName}>`
|
||||
}
|
||||
})
|
||||
|
||||
if (failed <= 10) {
|
||||
tr.failedSuites.map(suite => {
|
||||
suite.failedGroups.map(group => {
|
||||
group.failedTests.map(test => {
|
||||
req.blocks.push({
|
||||
type: 'section',
|
||||
text: {
|
||||
type: 'mrkdwn',
|
||||
text: `:red_circle: <${suite.link}|${test.name}>`
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
await webhook.send(req)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue