docs: update README test count and add pre-commit hook section

Test count updated from 1,251/1,255 to ~1,642. New pre-commit hook section documents golangci-lint, staticcheck, gosec, gitleaks, and go mod tidy checks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-07-11 14:12:35 +01:00
co-authored by Sisyphus
parent 85c043ad7f
commit 428e250b4f
+12 -1
View File
@@ -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