diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3e85a2..3129940 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: stable components: rustfmt @@ -26,5 +26,16 @@ jobs: - name: Check formatting run: cargo fmt --all -- --check + - name: Cache cargo build + uses: actions/cache@v6 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-test- + - name: Run tests run: cargo test