Skip to content

ci: add cargo fmt + clippy + test workflow#3

Merged
protosphinx merged 1 commit into
mainfrom
ci/wire-cargo-gates
May 3, 2026
Merged

ci: add cargo fmt + clippy + test workflow#3
protosphinx merged 1 commit into
mainfrom
ci/wire-cargo-gates

Conversation

@protosphinx
Copy link
Copy Markdown
Owner

Summary

maya has 42 inline unit tests but no CI to gate them. Every PR has relied on the author running cargo test locally.

This wires the three standard cargo gates plus the drive-by fixes needed for the first run to be green.

What landed

  1. .github/workflows/ci.yml — three jobs: cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings, cargo test --all-targets. clippy/test needs: fmt so fmt drift fails the cheap job first. Toolchain pinned to stable; cache via Swatinem/rust-cache@v2.

  2. Drive-by hygiene so the first run is green: cargo fmt applied (whitespace only), cargo clippy --fix where applicable (behaviour-equivalent idiomatic-modernisation lints).

Verification

  • cargo test --release42 passed
  • cargo fmt --all -- --check → clean
  • cargo clippy --all-targets -- -D warnings → clean

Test plan

  • CI fmt + clippy + test all pass on this PR
  • Future regressions get caught before merge instead of at the next manual cargo test

maya has 42 inline unit tests but no CI to gate them. Every PR
has relied on the author running `cargo test` locally; a regression
would only be caught at the next manual run.

Adds .github/workflows/ci.yml with three jobs:
- cargo fmt --all -- --check
- cargo clippy --all-targets -- -D warnings
- cargo test --all-targets

clippy and test both `needs: fmt` so a fmt drift fails one cheap job
rather than four expensive ones.

Drive-by hygiene fixes so the first CI run is green:
- cargo fmt applied (whitespace only).
- cargo clippy --fix where applicable (behaviour-equivalent, mostly
  assign-op-pattern and similar idiomatic-modernisation lints).

Verified locally: 42/42 tests pass, fmt clean, clippy clean
under -D warnings.
@protosphinx protosphinx merged commit 8de489a into main May 3, 2026
3 checks passed
@protosphinx protosphinx deleted the ci/wire-cargo-gates branch May 3, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant