report failed tests to slack

This commit is contained in:
A.J. Kaptijn 2024-03-14 17:32:48 +01:00
parent dd70238216
commit 7cb3970161
4 changed files with 39 additions and 6 deletions

View file

@ -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)