From 11e24d94f8090c0fca9644d79412f58a8a654f92 Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Mon, 24 Jan 2022 19:07:30 -0400 Subject: [PATCH] Revert changes removing cargo.lock and deny.toml checks Also refactor this to use a more redable and change prone cargo-deny-action. And move this actions out of the clippy-deps job, as this are more related to CI than linting. --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb208a31c86..201d6977666 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -252,6 +252,13 @@ jobs: - uses: Swatinem/rust-cache@v1 + # This check makes sure the crate dependency check is accurate + - name: Check Cargo.lock is up to date + uses: actions-rs/cargo@v1.0.3 + with: + command: check + args: --locked --all-features --all-targets + - name: cargo fetch uses: actions-rs/cargo@v1.0.3 with: @@ -270,3 +277,25 @@ jobs: with: command: build args: --verbose --release + + cargo-deny: + name: Check deny.toml crate dependencies and validate licenses + runs-on: ubuntu-latest + strategy: + matrix: + checks: + - advisories + - bans licenses sources + + # Prevent sudden announcement of a new advisory from failing ci: + continue-on-error: ${{ matrix.checks == 'advisories' }} + + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check ${{ matrix.checks }} + args: --all-features --workspace