From 328a6b4fdd948d0fa41480a8ca550d78f6e93ce0 Mon Sep 17 00:00:00 2001 From: Shachar Langbeheim Date: Thu, 14 Sep 2023 07:05:00 +0000 Subject: [PATCH] Update and use better maintained github actions. actions-rs is no longer maintained. --- .github/workflows/rust.yml | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8bf866b704..24012edd7a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,22 +60,21 @@ jobs: echo "$HOME" >> $GITHUB_PATH - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain with: toolchain: ${{ matrix.rust }} - override: true components: rustfmt - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run tests run: make test - name: Checkout RedisJSON if: steps.cache-redisjson.outputs.cache-hit != 'true' - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: "RedisJSON/RedisJSON" path: "./__ci/redis-json" @@ -121,22 +120,17 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain with: - profile: minimal toolchain: stable - override: true components: rustfmt, clippy - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets -- -D warnings + - uses: Swatinem/rust-cache@v2 + - run: cargo fmt --all -- --check + name: fmt + + - run: cargo clippy --all-features --all-targets -- -D warnings + name: clippy - name: doc run: cargo doc --no-deps --document-private-items env: @@ -173,14 +167,13 @@ jobs: echo "$HOME" >> $GITHUB_PATH - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain with: toolchain: ${{ env.rust_ver }} - override: true - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Benchmark run: |