From fae0facbe1b06a7cd4b9aff41cda8610d5adb509 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 14 Mar 2024 06:35:22 +0900 Subject: [PATCH 1/3] chore(ci): use dtolnay/rust-toolchain action to setup rust consistently --- .github/workflows/CI.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0a78778..5e10224 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,8 +11,9 @@ jobs: 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 @@ -27,8 +28,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 From aef95699a14b1ec4fa1c15ed8b90d14ba5a5f4eb Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 14 Mar 2024 06:36:32 +0900 Subject: [PATCH 2/3] refactor(ci): remove redundant job name --- .github/workflows/CI.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5e10224..816e274 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,6 @@ on: jobs: style: - name: Check Style runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,7 +17,6 @@ jobs: run: cargo fmt --all -- --check test: - name: Test needs: [style] runs-on: ubuntu-latest strategy: From 6ec6f7c01a85a7c38cf224ef5a1ed1d29b100f6d Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 14 Mar 2024 06:38:27 +0900 Subject: [PATCH 3/3] refactor(ci): remove unnecessary hyphen from rustfmt command --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 816e274..e212b4a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,7 +14,7 @@ jobs: with: components: rustfmt - name: Check formatting - run: cargo fmt --all -- --check + run: cargo fmt --all --check test: needs: [style]