File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,20 @@ jobs:
2727 restore-keys : |
2828 ${{ runner.os }}-cargo-
2929 - name : Set up Rust toolchain version
30- run : echo "TOOLCHAIN_VERSION=$(cat rust-toolchain | tr -d '\n' | tr -d ' ')" >> $GITHUB_ENV
30+ run : |
31+ if [ ! -f rust-toolchain.toml ]; then
32+ echo "Error: rust-toolchain.toml file not found!" >&2
33+ exit 1
34+ fi
35+ TOOLCHAIN_VERSION=$(grep 'channel' rust-toolchain.toml | cut -d '"' -f2)
36+ echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_ENV
3137 - name : Install Rust toolchain
3238 run : |
3339 rustup set profile minimal
3440 rustup install "$TOOLCHAIN_VERSION"
3541 rustup default "$TOOLCHAIN_VERSION"
3642 rustup component add rustfmt clippy llvm-tools-preview rustc-dev
37- rustup show
43+ rustup show
3844 - name : Test
3945 run : cargo test
4046 timeout-minutes : 20
4551 - name : Clippy
4652 run : |
4753 cargo clippy --all-targets -- -D warnings
48- cargo +$TOOLCHAIN_VERSION clippy --all-targets --all-features -- -D warnings
54+ cargo +$TOOLCHAIN_VERSION clippy --all-targets --all-features -- -D warnings
You can’t perform that action at this time.
0 commit comments