From 60c638336c4904945dffa2d1fb7884d25883268e Mon Sep 17 00:00:00 2001 From: tottoto Date: Tue, 11 Jun 2024 04:10:48 +0900 Subject: [PATCH] refactor(ci): small refactoring (#113) * chore(ci): use dtolnay/rust-toolchain action to setup rust consistently * refactor(ci): remove redundant job name * refactor(ci): remove unnecessary hyphen from rustfmt command --- .github/workflows/CI.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0a78778..e212b4a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,17 +7,16 @@ on: jobs: style: - name: Check Style runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Rustfmt - run: rustup component add rustfmt + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt - name: Check formatting - run: cargo fmt --all -- --check + run: cargo fmt --all --check test: - name: Test needs: [style] runs-on: ubuntu-latest strategy: @@ -27,8 +26,9 @@ jobs: - beta steps: - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} - name: Run tests run: cargo test --workspace