CI: Add caching
This commit is contained in:
parent
54addb6ca6
commit
f12b2b5a1f
|
@ -38,6 +38,15 @@ jobs:
|
|||
uses: ./.github/actions/prepare
|
||||
with:
|
||||
extra-features: ${{ matrix.extra_flags != 'NOT_A_PUZZLE' && matrix.extra_flags || '' }}
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Run tests
|
||||
run: >
|
||||
cargo test
|
||||
|
@ -64,6 +73,15 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- id: prepare
|
||||
uses: ./.github/actions/prepare
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-latest
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
id: toolchain
|
||||
- run: rustup override set ${{steps.toolchain.outputs.name}}
|
||||
|
@ -179,6 +197,15 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- id: prepare
|
||||
uses: ./.github/actions/prepare
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: codecov-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Generate coverage report
|
||||
run: >
|
||||
cargo tarpaulin
|
||||
|
|
Loading…
Reference in New Issue