Skip to content

Makefile: align cargo make all with CI checks#93

Merged
makubacki merged 1 commit intoOpenDevicePartnership:mainfrom
kat-perez:cargo-make-all-match-ci
Mar 12, 2026
Merged

Makefile: align cargo make all with CI checks#93
makubacki merged 1 commit intoOpenDevicePartnership:mainfrom
kat-perez:cargo-make-all-match-ci

Conversation

@kat-perez
Copy link
Contributor

@kat-perez kat-perez commented Mar 11, 2026

The cargo make all task is intended for local PR readiness validation, but it diverges from what CI actually checks in two ways:

  1. fmt vs fmt --check: The all task ran cargo fmt --all (which silently fixes formatting) instead of cargo fmt --all --check (which fails on unformatted code like CI does). This means cargo make all would never catch formatting issues.

  2. Missing cargo test --doc: CI runs cargo test --doc separately, but cargo make all didn't include it.

How this was tested

Ran cargo make fmt-check, cargo make doc-test, and cargo make all locally in the patina repo with the equivalent changes applied.

@kat-perez kat-perez marked this pull request as ready for review March 11, 2026 21:25
Copy link
Contributor

@Javagedes Javagedes left a comment

Choose a reason for hiding this comment

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

If we are going to do this, then we should also update the CI workflow to call these new tasks instead of the direct cargo <cmd> calls they currently do.

The `all` task previously ran `fmt` (which applies formatting) instead of
checking it, and was missing `doc-test`. This caused `cargo make all` to
not catch the same issues that CI catches. Additionally, CI called
`cargo fmt --all --check` and `cargo test --doc` directly instead of
using cargo-make tasks.

- Add `fmt-check` task (`cargo fmt --all --check`) to all Makefiles
- Add `doc-test` task (`cargo test --doc`) to all Makefiles
- Replace `fmt` with `fmt-check` in `all` dependencies (moved first for fast failure)
- Add `doc-test` to `all` dependencies
- Update CiWorkflow.yml to use `cargo make fmt-check` and `cargo make doc-test`
@kat-perez kat-perez force-pushed the cargo-make-all-match-ci branch from d5d6f8d to eb6b295 Compare March 12, 2026 15:45
@kat-perez
Copy link
Contributor Author

If we are going to do this, then we should also update the CI workflow to call these new tasks instead of the direct cargo <cmd> calls they currently do.

Updated to call the new tasks

@kat-perez kat-perez requested a review from Javagedes March 12, 2026 15:45
@makubacki makubacki merged commit c73fd0c into OpenDevicePartnership:main Mar 12, 2026
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.

3 participants