chore: add check workflow and pre-commit recipes #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/checks-and-pre-commit"
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?
Summary
Adds the
check.ymlworkflow +install-hooks/pre-commitrecipes per governance/PRE_COMMIT.md. The production binary cross-compiles to Windows, but perCLAUDE.mdthe 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 inbuild-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: newdev_imagevariable +install-hooks+pre-commitrecipes. Usesrust-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 asdev-explorer-bookmarks-cargo-{target,registry}named volumes.Test plan
just install-hookswrites the stub correctly.just pre-commitruns and passes (it compiles for Linux, not Windows).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>