diff --git a/README.md b/README.md index 1676084..3fc9662 100644 --- a/README.md +++ b/README.md @@ -76,11 +76,22 @@ Default logins (password: `password`): ```bash cd backend && go build -o bin/backend ./main.go cd frontend && npm ci && npm run build -cd backend && go test -tags "test,dev" -count=1 -parallel 8 ./... # 1,251/1,255 tests passed, 4 skipped (~13s) +cd backend && go test -tags "test,dev" -count=1 -parallel 8 ./... # ~1,642 tests passed (~13s) cd backend && go test -tags "test,dev" -count=1 -race -timeout 480s ./... # race detector (all packages, ~4min) cd backend && go test -tags "test,dev" -count=10 -parallel 8 ./... # thorough verification (~2-3min) ``` +### Pre-commit hooks + +`.githooks/pre-commit` runs on every commit (configured via `git config core.hooksPath .githooks`): +- **Frontend**: `prettier --write` auto-format, then `eslint` all files +- **Backend** (only if `backend/` changed): `go vet`, `golangci-lint` (3m timeout), `staticcheck`, `gosec`, `go mod tidy` check +- **Global**: `gitleaks` secret scan (skips gracefully if not installed) + +To bypass: `git commit --no-verify`. + +### CI caching + CI caches Go modules (`~/go/pkg/mod`) and npm dependencies (`~/.npm`, `node_modules`) via `actions/cache` — keyed on `go.sum` and `package-lock.json` respectively. Cache is served by Gitea's built-in cache server at `git.popertots.com`. First run downloads everything (~3m35s), subsequent runs restore from cache in seconds. ## Full Documentation