ci: add rustfmt and clippy components explicitly
ci / fmt (pull_request) Successful in 20s
ci / clippy (pull_request) Successful in 2m4s
ci / doc (pull_request) Successful in 2m8s
ci / test (pull_request) Successful in 6m27s

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:
2026-09-03 12:54:29 +03:00
co-authored by Claude Fable 5.1
parent 094536a341
commit db6316713a
+9 -2
View File
@@ -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