-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (54 loc) · 1.78 KB
/
artillery.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Artillery Tests
on:
workflow_dispatch:
schedule:
- cron: '*/15 * * * *' # Run every 20 minutes
jobs:
artillery:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install
run: npm ci
- name: Execute load tests
uses: artilleryio/action-cli@v1
with:
command: run ./test/artillery/import-pokemon.yml
env:
ARTILLERY_PLUGIN_PATH: ${{ github.workspace }}/node_modules/
- 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 - 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