diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 53eda72..9bfec32 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,21 +18,19 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v1 - - uses: actions/cache@v3 + - uses: actions/cache@v4 + id: cache-cargo-fetch with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-fetch-${{ hashFiles('Cargo.lock') }} + path: target + restore-keys: ${{ runner.os }}-cargo-fetch - name: Fetch Dependencies + if: steps.cache-cargo-fetch.outputs.cache-hit != 'true' run: cargo fetch - name: Build run: cargo build --all-features - name: Run tests - run: cargo test --workspace + run: cargo test lint: runs-on: ubuntu-latest