-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.01 KB
/
perf-nightly.yml
File metadata and controls
44 lines (36 loc) · 1.01 KB
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
name: Performance Nightly
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
k6-nightly:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run backend stack
run: docker compose up --build -d db backend
- name: Wait for backend health
run: |
for i in {1..30}; do
if curl -fsS http://localhost:3000/health >/dev/null; then
exit 0
fi
sleep 2
done
echo "Backend did not become healthy in time"
exit 1
- name: Setup k6
uses: grafana/setup-k6-action@v1
- name: Run k6 performance tests
run: k6 run --summary-export k6-summary.json tests/perf/api-load.js
- name: Upload k6 summary
if: always()
uses: actions/upload-artifact@v4
with:
name: k6-summary
path: k6-summary.json
- name: Shutdown Docker stack
if: always()
run: docker compose down -v