-
-
Notifications
You must be signed in to change notification settings - Fork 351
58 lines (53 loc) · 1.41 KB
/
performance.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: Performance
on:
push:
branches: [ master, release/* ]
tags: [ '**' ]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
load-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: alerta
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
alerta:
image: ghcr.io/alerta/alerta-api
ports:
- 8080:8080
env:
DEBUG: 1
DATABASE_URL: postgres://postgres:postgres@postgres:5432/alerta
options: >-
--health-cmd "curl --fail http://localhost:8080/_ || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-start-period 30s
steps:
- name: Perf test
run: >-
docker run
--network host
ghcr.io/act10ns/hey
-z 2s
-m POST
-T application/json
-d '{"environment":"Production","service":["network"],"resource":"router01","event":"node_down"}'
http://localhost:8080/alert
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()