ci: add rustfmt and clippy components explicitly
rustup auto-installs the pinned toolchain from rust-toolchain on the runner but not its listed components; the fmt job failed with "cargo-fmt is not installed for the toolchain". Add the component in the two jobs that need it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
This commit is contained in:
@@ -24,14 +24,19 @@ concurrency:
|
||||
env:
|
||||
CARGO_INCREMENTAL: "0"
|
||||
CARGO_TERM_COLOR: always
|
||||
# rust-toolchain pins 1.93.0; rustup on the runner installs it on first use.
|
||||
RUSTUP_TOOLCHAIN: 1.93.0
|
||||
|
||||
# rust-toolchain pins 1.93.0. rustup on the runner auto-installs the toolchain
|
||||
# on first use but NOT the components the file lists (observed: "cargo-fmt is
|
||||
# not installed for the toolchain"), so each job that needs one adds it
|
||||
# explicitly; the call is a no-op once present.
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: rust
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: toolchain
|
||||
run: rustup component add rustfmt
|
||||
- name: rustfmt
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
@@ -40,6 +45,8 @@ jobs:
|
||||
needs: fmt
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: toolchain
|
||||
run: rustup component add clippy
|
||||
- name: clippy (all targets, all features, warnings denied)
|
||||
# Same invocation as clippy.sh so local and CI agree.
|
||||
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
||||
|
||||
Reference in New Issue
Block a user