Skip to content

Commit

Permalink
add caching to cargo test and audit
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikKaum authored and brandonwillard committed Sep 10, 2024
1 parent e5c5b1d commit ed7cdf2
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,25 @@ jobs:
run: ./.github/scripts/build_sdist_and_wheel.sh

cargo-test:
name: Run Cargo tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo test
run: cargo test
name: Run Cargo tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache Cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo test
run: cargo test

cargo-audit:
name: Run Cargo audit
Expand All @@ -131,6 +139,14 @@ jobs:
with:
toolchain: stable
override: true
- name: Cache Cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Run cargo audit
Expand Down

0 comments on commit ed7cdf2

Please sign in to comment.