ci: add pre-push hook (auto-installed) and API/model smoke tests

- .githooks/pre-push: runs vue-tsc before every push; blocks TypeScript
  regressions locally without any manual developer setup
- postinstall: git config core.hooksPath .githooks activates the hook
  automatically on yarn install (yarn 4, enableScripts: true)
- tests/smoke/apiHandlers.smoke.test.ts: import-level smoke tests for all
  bug-report handlers + 3 core admin handlers — catches broken exports and
  top-level runtime errors without a DB or running server
- tests/server/bugReport.test.ts: 16 unit tests covering comment validation,
  contact-string building, model schema fields, status enum, and patch logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
itsrubberduck
2026-06-18 10:46:56 +02:00
parent d8c27260da
commit bfa83305e8
4 changed files with 171 additions and 1 deletions

View File

@@ -10,7 +10,7 @@
"generate": "nuxt generate",
"preview": "nuxt preview",
"start": "node .output/server/index.mjs",
"postinstall": "nuxt prepare",
"postinstall": "nuxt prepare && (git config core.hooksPath .githooks 2>/dev/null || true)",
"typecheck": "vue-tsc --build",
"sharp:rebuild": "SHARP_IGNORE_GLOBAL_LIBVIPS=1 yarn rebuild sharp",
"import:decision": "tsx --tsconfig tsconfig.scripts.json scripts/import-decision-tree.ts",