Skip to content

Performance Nightly #26

Performance Nightly

Performance Nightly #26

Workflow file for this run

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