diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 259f574..8e43dd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: - run: cargo fmt -- --check # ========================== -# Test +# Tests # ========================== test: name: Test @@ -54,21 +54,20 @@ jobs: uses: actions/cache@v4 with: path: | + ~/.cargo/bin ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-nextest-${{ hashFiles('**/Cargo.lock') }} restore-keys: | + ${{ runner.os }}-cargo-nextest- ${{ runner.os }}-cargo- - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Install cargo-nextest + run: cargo install --locked cargo-nextest || true - - name: Build tests - run: cargo test --no-run -j $(nproc) - - - name: Run tests - run: cargo nextest run --all-features --no-fail-fast + - name: Run tests with nextest + run: cargo nextest run -j "$(nproc)" # ========================== # Clippy @@ -95,11 +94,13 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} restore-keys: | + ${{ runner.os }}-cargo-clippy- ${{ runner.os }}-cargo- - - run: cargo clippy -j $(nproc) -- --cap-lints warn + - name: Run clippy + run: cargo clippy -j "$(nproc)" -- --cap-lints warn # ========================== # Udeps @@ -115,19 +116,24 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + with: + components: rust-src - name: Cache cargo uses: actions/cache@v4 with: path: | + ~/.cargo/bin ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-udeps-${{ hashFiles('**/Cargo.lock') }} restore-keys: | + ${{ runner.os }}-cargo-udeps- ${{ runner.os }}-cargo- - name: Install cargo-udeps - run: cargo install cargo-udeps || true + run: cargo install --locked cargo-udeps || true - - run: cargo udeps || true + - name: Run udeps + run: cargo udeps -j "$(nproc)" || true