feat(ci): integrate k6 health baseline testing into Gitea workflow
Some checks failed
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Failing after 5s

- Added a new job to the Gitea CI workflow to install k6 and run health baseline tests after the health wait period.
- Updated documentation to reflect the automatic execution of k6 in the CI pipeline and clarified local execution instructions.
- Enhanced architecture documentation to indicate the completion of Phase 0 for the pipeline part, with k6 running after each relevant deploy.
This commit is contained in:
Lars 2026-05-14 06:56:50 +02:00
parent 4b2848c7c3
commit c7650cac2f
3 changed files with 23 additions and 3 deletions

View File

@ -153,6 +153,24 @@ jobs:
curl -v "$BASE/health" || true
exit 1
- name: Install k6 (Phase-0 /health-Baseline)
run: |
set -e
K6_VER="v0.55.0"
curl -sSL "https://github.com/grafana/k6/releases/download/${K6_VER}/k6-${K6_VER}-linux-amd64.tar.gz" -o /tmp/k6.tgz
tar -xzf /tmp/k6.tgz -C /tmp
sudo mv "/tmp/k6-${K6_VER}-linux-amd64/k6" /usr/local/bin/k6
k6 version
- name: k6 Health-Baseline (parallele /health)
env:
BASE_URL: ${{ steps.e2e.outputs.base_url }}
run: |
set -e
echo "k6 gegen BASE_URL=$BASE_URL"
k6 run scripts/load/k6-health-baseline.js
echo "✓ k6 Health-Baseline passed"
- name: Testnutzer registrieren (Dev, nur wenn möglich)
if: ${{ steps.e2e.outputs.mode == 'dev' }}
env:

View File

@ -78,7 +78,8 @@ Messung: Repo-Root → `cd frontend && npm run build` (Vite Production).
### 3.2 k6 parallele /health
- **Skript:** `scripts/load/k6-health-baseline.js`
- **Anleitung:** `scripts/load/README.md`
- **CI:** Läuft **automatisch** im Gitea-Workflow **playwright-tests** nach der Health-Wartezeit und **vor** Playwright (`.gitea/workflows/test.yml`).
- **Lokal:** siehe `scripts/load/README.md`
- **Baseline notieren:** k6-Ausgabe `http_req_duration` p(95), Checks succeeded.
| Szenario | p95 / Fehlerquote | Datum / BASE_URL |
@ -89,7 +90,7 @@ Messung: Repo-Root → `cd frontend && npm run build` (Vite Production).
## 4. Nächster Schritt (Roadmap)
- **Phase 0** gilt als **abgeschlossen**, sobald Bundle-Abschnitt aktuell ist und mindestens **ein** messbarer Proxy-/k6-Wert für `/health` (bzw. erste API-Zeile) eingetragen ist Rest der Tabelle kann iterativ gefüllt werden.
- **Phase 0** ist für den Pipeline-Teil **abgeschlossen**: Bundle dokumentiert; **k6** läuft in CI nach jedem relevanten Deploy (mit Test-Suite); API-p95-Tabellen kann das Team aus Monitoring weiter befüllen (optional, kein Deploy-Blocker).
- **Phase 2** (Backend Lesepfade, ggf. Dashboard-Summary) **startet erst nach** diesem Dokument als verbindlicher Baseline-Einstieg (kein blocker für Code, aber Vergleich nach Phase 2 gegen diese Werte).
---

View File

@ -2,6 +2,8 @@
Parallele GETs auf `/health` **ohne** Auth, geeignet für Dev/Prod hinter dem gleichen Proxy wie die App.
**CI / Deploy:** In **`.gitea/workflows/test.yml`** (Job `playwright-tests`): nach **/health-Wartezeit** läuft **k6** automatisch, danach Playwright. Gleiche `BASE_URL` wie E2E (Dev oder Prod nach `workflow_run`). Kein manueller Schritt nach dem Deploy.
## Voraussetzung
[k6 installieren](https://k6.io/docs/getting-started/installation/).
@ -16,7 +18,6 @@ k6 run scripts/load/k6-health-baseline.js
```bash
# Linux / macOS
```bash
BASE_URL=https://dev.shinkan.jinkendo.de k6 run scripts/load/k6-health-baseline.js
```