From d3001d170c54e7ec96b97724a2653a89779a762d Mon Sep 17 00:00:00 2001 From: Takayuki Nakata Date: Mon, 10 Apr 2023 22:25:16 +0900 Subject: [PATCH 1/2] Update actions to avoid Node.js 12 actions --- .github/workflows/ci.yml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18d387e1..8c765a64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,34 +13,23 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: hecrj/setup-rust-action@v1 with: - profile: minimal - toolchain: stable - override: true + rust-version: stable components: rustfmt - - name: Check format - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check + run: cargo fmt --check clippy: name: Clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: hecrj/setup-rust-action@v1 with: - profile: minimal - toolchain: stable - override: true + rust-version: stable components: clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets --all-features -- -D warnings + - run: cargo clippy --all-targets --all-features -- -D warnings tests: name: Tests From 86b6546dec8be4ed4cc9d1de8bc3a22dc5f856eb Mon Sep 17 00:00:00 2001 From: Takayuki Nakata Date: Tue, 11 Apr 2023 00:06:19 +0900 Subject: [PATCH 2/2] Use dtolnay/rust-toolchain --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c765a64..a071c83d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,8 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Rust - uses: hecrj/setup-rust-action@v1 + uses: dtolnay/rust-toolchain@stable with: - rust-version: stable components: rustfmt - name: Check format run: cargo fmt --check @@ -25,9 +24,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: hecrj/setup-rust-action@v1 + - uses: dtolnay/rust-toolchain@stable with: - rust-version: stable components: clippy - run: cargo clippy --all-targets --all-features -- -D warnings @@ -50,9 +48,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Rust - uses: hecrj/setup-rust-action@v1 + uses: dtolnay/rust-toolchain@master with: - rust-version: ${{ matrix.rust }} + toolchain: ${{ matrix.rust }} - name: Build System Info run: rustc --version