From 2f7fe81d810dc72581494fa0c11655bca5074bfb Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Fri, 8 Sep 2023 16:12:46 +0200 Subject: [PATCH] run toolchain before cache --- .github/workflows/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cf44ce..ead0e3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set rust version run: | @@ -32,6 +32,14 @@ jobs: sudo apt-get update sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev + # The toolchain action should definitely be run before the cache action + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: ${{ env.RUST_STABLE }} + components: rustfmt, clippy + # avoid the default "-D warnings" + rustflags: "" + # https://github.com/actions/cache/blob/main/examples.md#rust---cargo - uses: actions/cache@v3 with: @@ -43,14 +51,6 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: ${{ env.RUST_STABLE }} - components: rustfmt, clippy - # avoid the default "-D warnings" - rustflags: "" - - - name: Run fmt+clippy run: | cargo fmt --all --check