From 1aa74beb5891fad42a52b3491a34e600843d3639 Mon Sep 17 00:00:00 2001 From: Oscar Reyes Date: Tue, 16 Apr 2024 10:33:30 -0600 Subject: [PATCH] chore: adding artillery tests --- .github/workflows/artillery.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/artillery.yml b/.github/workflows/artillery.yml index 640a8a9..e50e77d 100644 --- a/.github/workflows/artillery.yml +++ b/.github/workflows/artillery.yml @@ -16,3 +16,38 @@ jobs: uses: artilleryio/action-cli@v1 with: command: run ./test/artillery/import-pokemon.yml + - name: Send message on Slack in case of failure + if: ${{ failure() }} + uses: slackapi/slack-github-action@v1.24.0 + with: + # check the block kit builder docs to understand how it works + # and how to modify it: https://api.slack.com/block-kit + payload: | + { + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": ":warning: Synthetic Monitoring Alert - Artillery - Pokeshop Demo :warning:", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Status:*\nFailed" + }, + { + "type": "mrkdwn", + "text": "*Pipeline:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK