feat(hooks): run PHPUnit in pre-commit hook (#67)
All checks were successful
Deploy Feature Branch to Test / PHP Syntax Check (push) Successful in 34s
Lint / PHP Syntax Check (push) Successful in 57s
Deploy Feature Branch to Test / CSS Lint (stylelint) (push) Successful in 1m41s
Deploy Feature Branch to Test / HTML Lint (htmlhint) (push) Successful in 1m39s
Lint / CSS Lint (stylelint) (push) Successful in 1m39s
Lint / HTML Lint (htmlhint) (push) Successful in 1m8s
Deploy Feature Branch to Test / Deploy to Test Environment (push) Successful in 30s
All checks were successful
Deploy Feature Branch to Test / PHP Syntax Check (push) Successful in 34s
Lint / PHP Syntax Check (push) Successful in 57s
Deploy Feature Branch to Test / CSS Lint (stylelint) (push) Successful in 1m41s
Deploy Feature Branch to Test / HTML Lint (htmlhint) (push) Successful in 1m39s
Lint / CSS Lint (stylelint) (push) Successful in 1m39s
Lint / HTML Lint (htmlhint) (push) Successful in 1m8s
Deploy Feature Branch to Test / Deploy to Test Environment (push) Successful in 30s
Erweitert den Husky pre-commit-Hook um einen PHPUnit-Schritt.
Ausserdem wird scripts/safe-commit.sh aktualisiert, damit das
Safety-Net dieselbe Logik wie der Hook verwendet (kein doppelter Code).
Vorher: Hook rief nur 'npx lint-staged' auf.
Nachher: Hook ruft scripts/pre-commit-checks.sh auf, das
- lint-staged ausfuehrt (unveraendert)
- PHPUnit nur dann ausfuehrt, wenn PHP-relevante Dateien
gestaged sind (Performance-Optimierung: Issue #67 Anforderung)
- Bei Test-Fehler den Commit mit Exit-Code 1 abbricht
Closes #67
This commit is contained in:
@@ -1 +1,3 @@
|
||||
npx lint-staged
|
||||
# Delegiert an scripts/pre-commit-checks.sh
|
||||
# (gleiche Logik wie safe-commit.sh-Safety-Net, nur einmalig)
|
||||
./scripts/pre-commit-checks.sh
|
||||
|
||||
Reference in New Issue
Block a user