Skip to content

ci: add cargo fmt, clippy, and test to CI pipeline - #61

Merged
BryanFRD merged 2 commits into
mainfrom
ci/cargo-test-clippy
Apr 8, 2026
Merged

BryanFRD merged 2 commits into
mainfrom
ci/cargo-test-clippy

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add cargo fmt --check to enforce consistent formatting
  • Add cargo clippy -- -D warnings to catch lint issues
  • Add cargo test to run unit tests in CI

All three steps run before the build step so failures are caught early.

Closes #53

Copilot AI review requested due to automatic review settings April 8, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CI workflow to run Rust formatting, linting, and unit tests for the generator crate before building and generating fixtures, ensuring failures are caught earlier in the pipeline.

Changes:

  • Add cargo fmt --check to enforce Rust formatting in CI
  • Add cargo clippy -- -D warnings to fail CI on clippy warnings
  • Add cargo test to run unit tests in CI before the build step

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +31
- name: Check formatting
working-directory: generator
run: cargo fmt --check

- name: Clippy
working-directory: generator
run: cargo clippy -- -D warnings

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo fmt and cargo clippy require the rustfmt and clippy rustup components. The workflow installs dtolnay/rust-toolchain@stable without specifying components, so these steps may fail on runners where the components aren’t preinstalled. Consider configuring the toolchain step with components: rustfmt, clippy (or explicitly running rustup component add rustfmt clippy) to make CI deterministic.

Copilot uses AI. Check for mistakes.
@BryanFRD
BryanFRD merged commit 366927c into main Apr 8, 2026
1 check passed
@BryanFRD
BryanFRD deleted the ci/cargo-test-clippy branch April 8, 2026 12:34
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.

ci: add cargo test and cargo clippy to CI pipeline

2 participants