fix(ci): satisfy rustfmt and use binary-crate test invocation #14

Merged
David merged 1 commit from fix/ci-checks into main 2026-05-14 01:02:26 +02:00
Owner

The Check workflow (fmt + clippy + build + tests) has been failing on every push since it landed in #9. Two independent root causes:

  1. cargo fmt --check rejects several long single-line expressions in build.rs, src/main.rs, and src/video/convert.rs. Running cargo fmt over the tree settles the diff so the step exits clean. Cargo.lock incidentally rewrites the [[package]] monkey entry into its correct alphabetical slot when cargo touches the file, so it's included.
  2. The Unit tests step ran cargo test --lib, but monkey is a binary-only crate with no library target, so cargo errored with no library targets found in package monkey. The unit tests live in #[cfg(test)] modules under src/, which cargo test runs against the bin target. The ffmpeg-dependent integration tests in tests/video_convert.rs are #[ignore]d per CLAUDE.md, so dropping --lib runs the unit tests without needing ffmpeg on the runner. The matching change is applied to the pre-commit recipe in justfile so just pre-commit matches CI.

Locally, cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo build --all-targets && cargo test all pass on this branch.

Test plan

  • Confirm the Forgejo Check workflow for this branch passes all four steps (fmt, clippy, build, test).
The `Check` workflow (`fmt + clippy + build + tests`) has been failing on every push since it landed in #9. Two independent root causes: 1. `cargo fmt --check` rejects several long single-line expressions in `build.rs`, `src/main.rs`, and `src/video/convert.rs`. Running `cargo fmt` over the tree settles the diff so the step exits clean. Cargo.lock incidentally rewrites the `[[package]] monkey` entry into its correct alphabetical slot when cargo touches the file, so it's included. 2. The `Unit tests` step ran `cargo test --lib`, but monkey is a binary-only crate with no library target, so cargo errored with `no library targets found in package monkey`. The unit tests live in `#[cfg(test)]` modules under `src/`, which `cargo test` runs against the bin target. The ffmpeg-dependent integration tests in `tests/video_convert.rs` are `#[ignore]`d per CLAUDE.md, so dropping `--lib` runs the unit tests without needing ffmpeg on the runner. The matching change is applied to the `pre-commit` recipe in `justfile` so `just pre-commit` matches CI. Locally, `cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo build --all-targets && cargo test` all pass on this branch. ## Test plan - [ ] Confirm the Forgejo `Check` workflow for this branch passes all four steps (fmt, clippy, build, test).
fix(ci): satisfy rustfmt and use binary-crate test invocation
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 17s
Create release / Create release from merged PR (pull_request) Has been skipped
50fe05fd80
The Check workflow has been red since it landed in #9 because of two independent issues. First, `build.rs`, `src/main.rs`, and `src/video/convert.rs` contained long single-line expressions that rustfmt 1.8 wants wrapped across multiple lines, so `cargo fmt --check` exited non-zero before clippy ever ran. Running `cargo fmt` over the tree resolves the diff; Cargo.lock is also reshuffled into its correct alphabetical position as a side effect of the local build. Second, the workflow ran `cargo test --lib`, but monkey is a binary-only crate with no library target, so cargo errored out with `no library targets found in package monkey`. The unit tests live in `#[cfg(test)]` modules under `src/`, which `cargo test` runs against the bin target, and the ffmpeg-dependent integration tests in `tests/video_convert.rs` are already `#[ignore]`d per CLAUDE.md, so dropping `--lib` runs the right set without needing ffmpeg on the runner. The matching change is applied to the `pre-commit` recipe in justfile so the local hook stays in sync with CI.
David merged commit 1c39ae8c65 into main 2026-05-14 01:02:26 +02:00
David deleted branch fix/ci-checks 2026-05-14 01:02:26 +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/monkey!14
No description provided.