From 18bc1ad6e671ec3e6ba744f21523c6ef305c3c82 Mon Sep 17 00:00:00 2001 From: bing Date: Tue, 9 Jul 2024 00:02:01 +0800 Subject: [PATCH] ci: replace actions-rs with dtolnay/rust-toolchain (#130) actions-rs is archived, plus dtolnay/rust-toolchain has some saner defaults and nicer ergonomics --- .github/workflows/lint.yaml | 24 +++++++++++++----------- .github/workflows/release-plz.yaml | 2 +- .github/workflows/test.yaml | 8 +++++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b3db7aec..880aa02a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,13 +15,13 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: nightly + toolchain: nightly-2024-06-10 components: rustfmt - name: cargo fmt - run: cargo +nightly fmt --all -- --check + run: cargo fmt --all -- --check clippy: name: clippy @@ -30,12 +30,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install rust toolchain - run: rustup toolchain install nightly-2024-06-10 + - name: Install Rust + uses: dtolnay/rust-toolchain + with: + toolchain: nightly-2024-06-10 + components: clippy - - name: Install Clippy - run: rustup component add --toolchain nightly-2024-06-10 clippy - - name: cargo clippy run: cargo clippy --all @@ -45,11 +45,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install rust toolchain - run: rustup toolchain install nightly-2024-06-10 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2024-06-10 - name: install udeps run: cargo install --git https://github.com/est31/cargo-udeps --locked - name: cargo udeps - run: cargo udeps \ No newline at end of file + run: cargo udeps diff --git a/.github/workflows/release-plz.yaml b/.github/workflows/release-plz.yaml index 65ea1f92..436bb2f4 100644 --- a/.github/workflows/release-plz.yaml +++ b/.github/workflows/release-plz.yaml @@ -25,4 +25,4 @@ jobs: with: command: release-pr env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f544c5ea..aaf8a7f2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,8 +16,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install Rust toolchain - run: rustup toolchain install nightly-2024-06-10 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2024-06-10 - name: Run tests - run: cargo test --all \ No newline at end of file + run: cargo test --all