Skip to content

Commit

Permalink
post status only on slack
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Nov 27, 2024
1 parent fa1e138 commit cdb23be
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,37 @@ jobs:
# Run tests
venom run -vv --html-report --format=json --output-dir ${{ env.TESTOUT_PATH }} test/plural
- name: Upload artifacts
- name: Post status on Slack
uses: slackapi/[email protected]
with:
webhook-type: incoming-webhook
webhook: ${{ secrets.SLACK_WEBHOOK }}
payload: |
text: "*E2E / plural up / Azure*: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "E2E / plural up / Azure: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
if: always()
uses: actions/upload-artifact@v4
- name: Upload artifacts to Slack on failure
uses: slackapi/[email protected]
with:
name: azure
path: ${{ env.TESTOUT_PATH }}/test_results.html
compression-level: 9
method: files.uploadV2
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
{
"channel_id": "${{ secrets.SLACK_CHANNEL_ID }}" ,
"initial_comment": "`plural up` E2E tests on Azure have failed.",
"file_uploads": [
{
"file": "${{ env.TESTOUT_PATH }}/venom.log",
"filename": "venom.log"
},
{
"file": "${{ env.TESTOUT_PATH }}/test_results.html",
"filename": "rest_results.html"
}
]
}
if: failure()

0 comments on commit cdb23be

Please sign in to comment.