chore: add check workflow and pre-commit recipes #26

Merged
David merged 1 commit from chore/checks-and-pre-commit into main 2026-05-11 00:23:41 +02:00
Owner

Summary

Adds the check.yml workflow + install-hooks / pre-commit recipes per governance/PRE_COMMIT.md. The production binary cross-compiles to Windows, but per CLAUDE.md the code compiles natively on Linux (Windows-specific paths are #[cfg(...)]-gated or shell out to PowerShell), so the standard fmt/clippy/build/test shape works against the host Linux target. The Windows cross-compile already lives in build-oci-image.yml + release.yml; not duplicating it here.

Changes

  • .forgejo/workflows/check.yml (new): native fmt, clippy -D warnings, build --all-targets, test --lib.
  • justfile: new dev_image variable + install-hooks + pre-commit recipes. Uses rust-builder-glibc:v1.0.0-rust1.94-trixie (sufficient for native checks; the Windows cross-toolchain is only needed for the full release build pipeline). Cargo target + registry persist as dev-explorer-bookmarks-cargo-{target,registry} named volumes.

Test plan

  • just install-hooks writes the stub correctly.
  • just pre-commit runs and passes (it compiles for Linux, not Windows).
  • CI run on the branch passes.
## Summary Adds the `check.yml` workflow + `install-hooks` / `pre-commit` recipes per [governance/PRE_COMMIT.md](https://dev.a8n.run/a8n-tools/governance/src/branch/main/PRE_COMMIT.md). The production binary cross-compiles to Windows, but per `CLAUDE.md` the code compiles natively on Linux (Windows-specific paths are `#[cfg(...)]`-gated or shell out to PowerShell), so the standard fmt/clippy/build/test shape works against the host Linux target. The Windows cross-compile already lives in `build-oci-image.yml` + `release.yml`; not duplicating it here. ## Changes - `.forgejo/workflows/check.yml` (new): native fmt, clippy `-D warnings`, build `--all-targets`, test `--lib`. - `justfile`: new `dev_image` variable + `install-hooks` + `pre-commit` recipes. Uses `rust-builder-glibc:v1.0.0-rust1.94-trixie` (sufficient for native checks; the Windows cross-toolchain is only needed for the full release build pipeline). Cargo target + registry persist as `dev-explorer-bookmarks-cargo-{target,registry}` named volumes. ## Test plan - [ ] `just install-hooks` writes the stub correctly. - [ ] `just pre-commit` runs and passes (it compiles for Linux, not Windows). - [ ] CI run on the branch passes.
chore: add check workflow and pre-commit recipes
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 10s
Create release / Create release from merged PR (pull_request) Has been skipped
67e98c3d92
New .forgejo/workflows/check.yml runs on the opensuse-base CI image and exercises fmt, clippy --all-targets -- -D warnings, build --all-targets, and test --lib against the host Linux target. The production binary cross-compiles to x86_64-pc-windows-gnu, but per CLAUDE.md the code compiles natively on Linux (Windows-specific paths are #[cfg(...)]-gated or shell out to PowerShell), so the standard check shape works without a windows target step.

`just install-hooks` writes a stub at .git/hooks/pre-commit that execs `just pre-commit`; the recipe runs the same four cargo invocations inside rust-builder-glibc:v1.0.0-rust1.94-trixie via ad-hoc `docker run`, with `dev-explorer-bookmarks-cargo-{target,registry}` named volumes. The full cross-compile already lives in build-oci-image.yml + release.yml and is not duplicated in the pre-commit path.

See governance/PRE_COMMIT.md for the org-wide standard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
David merged commit e0b9713978 into main 2026-05-11 00:23:41 +02:00
David deleted branch chore/checks-and-pre-commit 2026-05-11 00:23:41 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
pandoras-box/explorer-bookmarks!26
No description provided.