Files
TS_Proto/.githooks/pre-push
T
nilesh.pandClaude Opus 4.8 45b5b34680 Add AI-assisted QA test workflow: scenario cards, runner, hooks, API capture
A complete loop for defining, generating, running and gating tests:

- qa/: scenario-card template + examples (API/UI/binding), the Claude
  generation prompt, and a QA runbook tying it together
- e2e/CLAUDE.md: conventions that keep AI-generated tests consistent
- run-tests.ps1: one runner for every layer (backend/api/web/ui/binding),
  logs per run under .testlogs/, JUnit output, evidence report, and a
  re-seed guard against stale demo data
- .githooks/ + scripts/install-hooks.ps1: pre-commit secret scan and
  pre-push unit tests (shift-left before CI)
- evidence report now captures each API call's request, payload and
  response (Authorization redacted); JUnit reporter added for CI
- scripts/db.mjs: db:check freshness guard

Azure DevOps pipeline deferred; the runner already emits JUnit + the
evidence report for any CI to publish.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 13:04:46 +05:30

21 lines
723 B
Bash

#!/bin/sh
# Pre-push gate: run the fast test layers (Go + Angular unit) before code leaves
# the machine. The browser e2e suite is left for CI to keep push quick.
#
# Bypass in a genuine emergency with: git push --no-verify (discouraged).
echo "pre-push: running unit layers (backend + web) ..."
# Delegate to the one runner so local and CI behave identically. The ps1
# refreshes PATH itself, so this works even in a terminal opened before the
# toolchain was installed.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File ./run-tests.ps1 -Layer unit -NoReport
code=$?
if [ "$code" -ne 0 ]; then
echo ""
echo "pre-push blocked: unit tests failed. Fix them, or push --no-verify to override."
exit 1
fi
exit 0