K6 Tests #4236
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: K6 Tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */2 * * *' # every two hours | |
jobs: | |
docker: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Start containers | |
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: | |
payload: | | |
{ | |
"text": ":warning: Synthetic Monitoring failed for *K6 with Pokeshop*. <${{ 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 |