File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,26 +244,20 @@ jobs:
244244 echo "found_cargo=false" >> $GITHUB_OUTPUT
245245 fi
246246
247- - name : Rust - setup toolchain
248- if : always() && steps.run_cargo.outputs.found_cargo == 'true'
249- env :
250- RUST_COMPONENTS : rustfmt
251- run : |
252- # If no toolchain file exists, set to stable
253- if [ ! -f "rust-toolchain.toml" ] && [ ! -f "rust-toolchain" ]; then
254- rustup default stable
255- fi
256-
257- # Install components for the active toolchain
258- rustup component add ${RUST_COMPONENTS}
259-
260- # Display current toolchain information
261- rustup show
247+ - name : Setup Rust
248+ uses : actions-rust-lang/setup-rust-toolchain@v1.12.0
249+ with :
250+ target : ${{ matrix.target }}
251+ components : ' clippy,rustfmt'
252+ cache : false
262253
263254 - name : Rust - cargo fmt
264255 if : always() && steps.run_cargo.outputs.found_cargo == 'true'
265- run : |
266- cargo fmt -- --check
256+ run : cargo fmt -- --check
257+
258+ - name : Rust - cargo clippy
259+ if : always() && steps.run_cargo.outputs.found_cargo == 'true'
260+ run : cargo clippy -- -D warnings
267261
268262 - name : YAML - find files
269263 id : yaml_files
You can’t perform that action at this time.
0 commit comments