chore: add check.yml and pre-commit hook recipes #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/pre-commit-hooks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.ymlruns on push/PR tomainon 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 existinglint/lint-saas,test/test-saasjustfile 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) andSAAS_JWT_SECRET=test-saas-secret-32-chars-padded!(saas), matching the existingtest/test-saasrecipes.Hook recipes
Two
[group: 'hooks']recipes appended under a# ── Hooks ──divider:install-hooks(verbatim governance stub writer) andpre-commit(Variant A, compose-run).pre-commitdepends onensure-env(the repo has it; copies.env.standaloneto.env) and runs each check.yml step in order throughdocker compose -f compose.dev.yml run --rm --no-deps app, passing the matching JWT secret env on each test step exactly as thetest/test-saasrecipes do. Opt in once per clone withjust install-hooks; bypass a single commit withgit commit --no-verify.Validated with
just --list(exit 0,[hooks]group shows both recipes). Did not run the hook or any docker/cargo build.