Skip to content

Commit

Permalink
Adding k6 to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Apr 3, 2024
1 parent 2d27a1f commit 7ddb9c4
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/k6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,46 @@ jobs:
uses: actions/checkout@v1

- name: Start containers
run: docker compose -f docker-compose.k6.workflows.yml up -d
run: docker compose -f docker-compose.k6.workflows.yml run k6-tracetest
env:
TRACETEST_API_TOKEN: ${{secrets.TRACETEST_TOKEN}}
POKESHOP_DEMO_URL: ${{secrets.POKESHOP_DEMO_URL}}

- name: Stop containers
if: always()
run: docker compose -f docker-compose.k6.workflows.yml down
- name: Send message on Slack in case of failure
if: ${{ failure() }}
uses: slackapi/[email protected]
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 - K6 - 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

0 comments on commit 7ddb9c4

Please sign in to comment.