From 03756b95f9bd3666e8ae6439f8b5b7c5f11a4814 Mon Sep 17 00:00:00 2001 From: PoiScript Date: Fri, 24 Nov 2023 16:21:44 +0800 Subject: [PATCH] ci: use dtolnay/rust-toolchain --- .github/workflows/ci.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92e98af..5746014 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,36 +10,15 @@ jobs: - name: Checkout code uses: actions/checkout@master - - name: Install latest stable Rust - uses: actions-rs/toolchain@v1 + - name: Setup rust + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - default: true - override: true + components: clippy, rustfmt - - name: Install minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check - - - name: Run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - - - name: Run test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features + - run: | + cargo fmt -- --check + cargo test --all-features + cargo clippy gh-pages: if: github.ref == 'refs/heads/v0.10'