Skip to content

CI does not run cargo test, clippy, or fmt — Rust quality regressions can land silently #126

@dobby-coder

Description

@dobby-coder

Summary

.github/workflows/ci.yml only runs release-plz and Docker image builds. There is no job that runs cargo test, cargo clippy, or cargo fmt --check. The Dockerfile compiles the binary (cargo build --profile ${CARGO_PROFILE} --bin cryptify) but never runs the test suite.

Impact

  • A test regression can merge to main without any signal — the codebase has a non-trivial test suite (src/main.rs mod tests, src/store.rs mod tests, src/email.rs mod tests) which is currently only validated by humans running cargo test locally.
  • cargo fmt --all -- --check currently fails on the working tree (drift in email.rs, error.rs, main.rs); CI cannot catch this.
  • Sister repo ibe already runs a fmt check in CI — this repo is the outlier.

Suggested approach

Recommend splitting into a small sequence so the test job can land green:

  1. Format pass: cargo fmt --all as a standalone PR (no logic changes).
  2. Clippy pass: address pre-existing warnings (e.g. the useless format! in email.rs) in a small PR. If any are intentional, #[allow(...)] with a comment.
  3. Add CI job that runs:
    • cargo fmt --all -- --check
    • cargo clippy --all-targets -- -D warnings
    • cargo test --all-targets

The job should run on pull_request and push: main, on ubuntu-latest, with Swatinem/rust-cache for speed. It should NOT block the existing release-plz/Docker workflow — add it as a separate job that runs in parallel.

Flagging for human review on sequencing — workers tend to bundle these together which makes the resulting PR hard to review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions