This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
chore: bump version #151
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# verify that Cargo.lock passes audit | |
cargo-audit: | |
name: Run cargo audit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch latest release version of cargo-audit | |
run: | | |
mkdir -p .github/caching | |
cargo search cargo-audit | grep '^cargo-audit' | awk '{gsub(/"/,"",$3); print $3}' > .github/caching/cargo-audit.lock | |
- name: Cache cargo-audit/bin | |
id: cache-cargo-audit | |
uses: actions/cache@v1 | |
with: | |
path: ${{ runner.tool_cache }}/cargo-audit/bin | |
key: cargo-audit-bin-${{ hashFiles('.github/caching/cargo-audit.lock') }} | |
- name: Install cargo-audit | |
if: "steps.cache-cargo-audit.outputs.cache-hit != 'true'" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: --root ${{ runner.tool_cache }}/cargo-audit --force cargo-audit | |
- run: echo "${{ runner.tool_cache }}/cargo-audit/bin" >> $GITHUB_PATH | |
- run: cargo audit |