Modernize CI workflows and enforce strict linting#129
Draft
e-desouza wants to merge 1 commit intofix/clippy-and-formattingfrom
Draft
Modernize CI workflows and enforce strict linting#129e-desouza wants to merge 1 commit intofix/clippy-and-formattingfrom
e-desouza wants to merge 1 commit intofix/clippy-and-formattingfrom
Conversation
cfc96af to
9c18cc5
Compare
9c18cc5 to
1625cc1
Compare
- Replace deprecated actions-rs/* with dtolnay/rust-toolchain and direct cargo commands (actions-rs has been archived) - Upgrade actions/checkout from v1/v2 to v4 - Add cargo fmt --check step to quality workflow - Enforce -D warnings on clippy in CI and pre-commit hook - Add rustfmt.toml with import ordering rules - Change pre-commit hook to check formatting rather than auto-fix - Fix duplicate "Build only core" step name (was building json-rpc)
de398b0 to
aa53d7f
Compare
1625cc1 to
e3407c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
actions-rs/*withdtolnay/rust-toolchainand directcargocommands (actions-rs has been archived)actions/checkoutfrom v1/v2 to v4cargo fmt --checkstep to quality workflow-D warningson clippy in CI and pre-commit hookrustfmt.tomlwith import ordering rulesContext of Change
The CI workflows were relying on
actions-rs/toolchain@v1,actions-rs/cargo@v1,actions-rs/clippy-check@v1, andactions-rs/audit-check@v1, all of which have been archived and are no longer maintained. GitHub has been printing deprecation warnings on every run.The replacement approach uses
dtolnay/rust-toolchain@stable(actively maintained, widely adopted) and runs cargo commands directly, which is the recommended pattern going forward.The pre-commit hook was running
cargo fmt(silently auto-fixing) andcargo clippy --fix --allow-staged(also silently fixing). This hides issues from developers. Changed to--checkmode so problems are surfaced rather than papered over.Depends on #128 (
fix/clippy-and-formatting) since the codebase needs to be clean before strict enforcement is turned on.Type of Change
Before / After
Before:
actions-rs/*actions with deprecation warningsactions/checkout@v1and@v2cargo fmtcheck in CI-D warnings(warnings are informational only)After:
dtolnay/rust-toolchain@stableand direct cargo invocationsactions/checkout@v4cargo fmt -- --checkruns in the quality workflowcargo clippy --all-features -- -D warningsenforced in CIrustfmt.tomlensures consistent import grouping and orderingTest Plan
Verified locally that all CI-equivalent commands pass:
cargo fmt -- --check cargo clippy --all-features -- -D warnings cargo test --all-features cargo auditThe workflow YAML was validated for correct syntax. Actual CI execution will be verified when this PR triggers the workflows.