ci: pre-push-Hook + Installer für lokalen Test-Gate
scripts/git-hooks/pre-push lässt pytest vor jedem Push laufen und bricht bei roten Tests ab — automatischer Regressionsschutz ohne Forgejo-Runner. scripts/install-hooks.sh installiert die versionierten Hooks nach .git/hooks (das selbst nicht versioniert ist). In DEPLOYMENT.md Teil 4.0 dokumentiert. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
284228b5fa
commit
7a0cf0abb4
3 changed files with 53 additions and 0 deletions
|
|
@ -1058,6 +1058,19 @@ sudo -u voice .venv/bin/python -m pytest -q
|
|||
# Erwartet: "213 passed"
|
||||
```
|
||||
|
||||
**Automatischer Schutz vor jedem Push (empfohlen):** Ein versionierter
|
||||
`pre-push`-Hook lässt die Suite vor jedem `git push` laufen und bricht bei roten
|
||||
Tests ab. Nach einem frischen Clone einmalig installieren:
|
||||
|
||||
```bash
|
||||
cd /opt/voice-assistant
|
||||
sudo -u voice bash scripts/install-hooks.sh
|
||||
```
|
||||
|
||||
Der Hook liegt unter `scripts/git-hooks/pre-push` (versioniert); `.git/hooks/`
|
||||
selbst wird von Git nicht versioniert, daher der Installer. Im Notfall umgehen:
|
||||
`git push --no-verify`.
|
||||
|
||||
Abdeckung u. a.: Stimm-/Geschlechts-Routing (`voice_for_route`), Piper Multi-Speaker
|
||||
(`#speaker_id`) und Gender-Code-Auflösung, Cartesia Voice-Map + nicht unterstützte
|
||||
Sprachen, Cartesia→Piper-Fallback. Die Fixture in `tests/conftest.py` neutralisiert
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue