chore: add mandatory test concept and smoke-test workflow

This commit is contained in:
openclaw 2026-03-04 18:28:50 +00:00
parent d08e6f8a17
commit d2ed667f0c
3 changed files with 59 additions and 2 deletions

36
TESTING.md Normal file
View file

@ -0,0 +1,36 @@
# Testkonzept helpyourneighbour
Dieses Testkonzept ist **verpflichtend vor jedem Push**.
## Ziel
Stabile, sichere Releases durch standardisierte Tests in Docker auf dem Unraid-Host.
## Pflichtablauf (immer)
1. **Lokaler Schnelltest**
- `cd backend && npm ci && npm test`
2. **Docker-Test auf Unraid**
- Image bauen und Smoke-Test im Container ausführen.
3. **Erst danach pushen**
- Wenn ein Test fehlschlägt: kein Push, zuerst Fix.
## Docker-Standard (Unraid)
Im Repo-Root ausführen:
```bash
docker run --rm -t \
-v "$PWD":/app \
-w /app/backend \
node:22-bookworm \
bash -lc "npm ci && npm test"
```
## Mindest-Testumfang
- Syntax-Validierung aller Backend-JS-Dateien (`node --check`)
- Smoke-Test-Exitcode 0
## Erweiterung (nächster Schritt)
- API-Integrationstests (Auth, Requests, Offers, Contacts)
- DB-Container für reproduzierbare End-to-End-Tests
## Verbindlichkeit
Dieses Konzept gilt als Standardprozess für alle weiteren Änderungen in `helpyourneighbour`.