chore: add check.yml and pre-commit hook recipes #36

Merged
nrupard merged 2 commits from chore/pre-commit-hooks into main 2026-06-12 17:54:57 +02:00
Owner

Adds opt-in pre-commit tooling per governance/PRE_COMMIT.md, plus the missing CI workflow this repo never had. No YouTrack issue (dev-tooling opt-in).

check.yml

New .forgejo/workflows/check.yml runs on push/PR to main on the opensuse-base runner: cargo fmt --check, then clippy + build + test for BOTH feature modes (standalone is the default, saas via --no-default-features --features saas), mirroring the repo's existing lint/lint-saas, test/test-saas justfile recipes and the dual-mode image matrix in build-oci-image.yml. The test secrets the suites require are set at the job level: JWT_SECRET=test-secret-at-least-32-chars-ok! (standalone) and SAAS_JWT_SECRET=test-saas-secret-32-chars-padded! (saas), matching the existing test / test-saas recipes.

Hook recipes

Two [group: 'hooks'] recipes appended under a # ── Hooks ── divider: install-hooks (verbatim governance stub writer) and pre-commit (Variant A, compose-run). pre-commit depends on ensure-env (the repo has it; copies .env.standalone to .env) and runs each check.yml step in order through docker compose -f compose.dev.yml run --rm --no-deps app, passing the matching JWT secret env on each test step exactly as the test / test-saas recipes do. Opt in once per clone with just install-hooks; bypass a single commit with git commit --no-verify.

Validated with just --list (exit 0, [hooks] group shows both recipes). Did not run the hook or any docker/cargo build.

Adds opt-in pre-commit tooling per governance/PRE_COMMIT.md, plus the missing CI workflow this repo never had. No YouTrack issue (dev-tooling opt-in). ## check.yml New `.forgejo/workflows/check.yml` runs on push/PR to `main` on the opensuse-base runner: `cargo fmt --check`, then clippy + build + test for BOTH feature modes (standalone is the default, saas via `--no-default-features --features saas`), mirroring the repo's existing `lint`/`lint-saas`, `test`/`test-saas` justfile recipes and the dual-mode image matrix in build-oci-image.yml. The test secrets the suites require are set at the job level: `JWT_SECRET=test-secret-at-least-32-chars-ok!` (standalone) and `SAAS_JWT_SECRET=test-saas-secret-32-chars-padded!` (saas), matching the existing `test` / `test-saas` recipes. ## Hook recipes Two `[group: 'hooks']` recipes appended under a `# ── Hooks ──` divider: `install-hooks` (verbatim governance stub writer) and `pre-commit` (Variant A, compose-run). `pre-commit` depends on `ensure-env` (the repo has it; copies `.env.standalone` to `.env`) and runs each check.yml step in order through `docker compose -f compose.dev.yml run --rm --no-deps app`, passing the matching JWT secret env on each test step exactly as the `test` / `test-saas` recipes do. Opt in once per clone with `just install-hooks`; bypass a single commit with `git commit --no-verify`. Validated with `just --list` (exit 0, `[hooks]` group shows both recipes). Did not run the hook or any docker/cargo build.
chore: add check.yml plus install-hooks and pre-commit recipes
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 4s
084a72d9a1
Add a minimal `.forgejo/workflows/check.yml` (fmt, clippy, build, standalone tests) and the governance `[group: 'hooks']` recipes from governance/PRE_COMMIT.md: `install-hooks` writes a `.git/hooks/pre-commit` stub that execs `just pre-commit`, and `pre-commit` mirrors check.yml step-for-step inside the dev compose `app` container so CI failures surface locally before push.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into chore/pre-commit-hooks
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 16s
Create release / Create release from merged PR (pull_request) Has been skipped
afb15bbdeb
nrupard deleted branch chore/pre-commit-hooks 2026-06-12 17:54:57 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
a8n-tools/rus!36
No description provided.