From c578463b107555606ff32f3937fcc003e8a19d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20M=C3=B6rling?= Date: Wed, 27 May 2026 13:43:35 +0200 Subject: [PATCH] Add mandatory pre-commit full check for agents and devs. Document that ./gradlew check must pass before every commit. Add scripts to run the same verification as CI and optionally install a git hook. Co-authored-by: Cursor --- AGENTS.md | 15 +++++++++++++++ scripts/install-pre-commit-hook.sh | 15 +++++++++++++++ scripts/pre-commit-check.sh | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100755 scripts/install-pre-commit-hook.sh create mode 100755 scripts/pre-commit-check.sh diff --git a/AGENTS.md b/AGENTS.md index 634d7f2..61b0a4d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -160,6 +160,21 @@ Full details in `@CODING_GUIDELINES.md`. Key rules: list concrete changes as bullet points. Never write single-line "feat: add X" messages. +**Before every commit (mandatory — agents must not skip):** + +```bash +# from repo root; needs Docker running +export POSTGRES_DB=bilhej POSTGRES_USER=bilhej POSTGRES_PASSWORD=test_pw_ci_123 +export JWT_SECRET=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +export STRIPE_SECRET_KEY=sk_test_fake STRIPE_WEBHOOK_SECRET=whsec_fake STRIPE_PRICE_ID=price_fake +./gradlew check +``` + +This runs frontend lint, frontend unit tests (242), backend tests (163), coverage +thresholds, Flyway checks, and **all 90 E2E tests in Docker**. **Do not commit or +push if this fails.** Optional local guard: `./scripts/install-pre-commit-hook.sh` +(runs the same `check` on every `git commit`). + ### Frontend (Vue.js 3) - `