From d6721aaa71b723aa79b491a9a0adc6ef713ad79a Mon Sep 17 00:00:00 2001 From: Alex Todorov Date: Wed, 11 Jan 2023 15:20:50 +0000 Subject: [PATCH] Enable cargo audit in CI --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 512a211160..5af9d4693d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,38 @@ jobs: run: | ./scripts/check-usage-of-log-warn.sh + audit: + name: cargo audit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set-Up + run: | + sudo apt-get update + sudo apt install -y protobuf-compiler + + - name: Configure rustc version + run: | + source ci/env + echo "RUSTC_VERSION=$RUSTC_VERSION" >> $GITHUB_ENV + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUSTC_VERSION }} + target: wasm32-unknown-unknown + profile: minimal + override: true + components: audit + - uses: Swatinem/rust-cache@v2 + + - name: Run cargo audit + uses: actions-rs/cargo@v1 + with: + command: audit + args: --deny warnings + fmt: name: Rustfmt runs-on: ubuntu-latest