Skip to content

Commit

Permalink
audit workflow: cache all of ~/.cargo
Browse files Browse the repository at this point in the history
we want ~/.cargo/bin/cargo-audit, and ~/.cargo/.crates.toml (or
.crates2.json) to remind `cargo install cargo-audit` that it's already
present.
  • Loading branch information
warner committed Feb 5, 2020
1 parent b311a06 commit d6f364b
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache cargo registry
- name: Cache ~/.cargo
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-audit-cargo-registry
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-audit-cargo-index
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-audit-cargo-build-target
# we specifically want ~/.cargo/bin/cargo-audit
# and ~/.cargo/.crates.toml and .crates2.json
# which cargo-install uses to remember that it's
# already installed
path: ~/.cargo
key: ${{ runner.os }}-audit-dotcargo
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit d6f364b

Please sign in to comment.