Skip to content

Commit

Permalink
fix(ci): Replace actions-rs/toolchain with dtolnay/rust-toolchain
Browse files Browse the repository at this point in the history
Because node version is going to be deprecated

Signed-off-by: Alexander Gil <[email protected]>
  • Loading branch information
pando85 committed Jan 23, 2023
1 parent 2117012 commit 4f0101e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ jobs:
uses: actions/checkout@v3

- name: Install fmt with stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
override: true

- name: Run cargo fmt
run: cargo fmt --all -- --check
Expand All @@ -34,11 +33,10 @@ jobs:
uses: actions/checkout@v3

- name: Install clippy with stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
override: true

- uses: actions-rs/clippy-check@v1
with:
Expand All @@ -58,12 +56,10 @@ jobs:
echo "MIN_SUPPORTED_RUST_VERSION=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
default: true
components: clippy
profile: minimal

- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -115,11 +111,10 @@ jobs:
key: ${{ matrix.job.target }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
targets: ${{ matrix.job.target }}

- name: Run tests
uses: actions-rs/cargo@v1
Expand Down

0 comments on commit 4f0101e

Please sign in to comment.