mirror of
https://github.com/alerta/alerta.git
synced 2025-01-25 01:39:40 +00:00
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: Performance
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, release/* ]
|
|
tags: [ '**' ]
|
|
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
jobs:
|
|
load-test:
|
|
name: Load Test
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
alerta:
|
|
image: ghcr.io/alerta/alerta-api
|
|
env:
|
|
DEBUG: 1
|
|
DATABASE_URL: postgres://postgres:postgres@postgres:5432/alerta
|
|
ports:
|
|
- 8080:8080
|
|
options: >-
|
|
--health-cmd "curl --fail http://localhost:8080/_ || exit 1"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
postgres:
|
|
image: postgres:13
|
|
env:
|
|
POSTGRES_DB: alerta
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- 5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- name: Run test
|
|
run: >-
|
|
docker run ghcr.io/act10ns/hey
|
|
-z 2s
|
|
http://localhost:8080/_
|
|
# -m POST
|
|
# -T application/json
|
|
# -d '{"resource":"router01", "event":"node_down"}'
|
|
# http://localhost:8080/alert
|