Skip to content

Commit 27405b2

Browse files
committed
cargo-deny: Integrate into CI pipeline
1 parent 4d21a0f commit 27405b2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
env:
16+
# renovate: datasource=crate depName=cargo-deny versioning=semver
17+
CARGO_DENY_VERSION: 0.13.9
1618
# renovate: datasource=crate depName=diesel_cli versioning=semver
1719
DIESEL_CLI_VERSION: 2.0.1
1820
# renovate: datasource=npm depName=pnpm
@@ -53,9 +55,15 @@ jobs:
5355
Cargo.toml
5456
rust-toolchain.toml
5557
58+
- uses: tj-actions/[email protected]
59+
id: changed-files-rust-lockfile
60+
with:
61+
files: Cargo.lock
62+
5663
outputs:
5764
non-js: ${{ steps.changed-files-non-js.outputs.any_modified }}
5865
non-rust: ${{ steps.changed-files-non-rust.outputs.any_modified }}
66+
rust-lockfile: ${{ steps.changed-files-rust-lockfile.outputs.any_modified }}
5967

6068
backend-lint:
6169
name: Backend / Lint
@@ -77,6 +85,23 @@ jobs:
7785
- run: cargo fmt --check
7886
- run: cargo clippy --all-targets --all-features --all
7987

88+
backend-dep-check:
89+
name: Backend / Dependencies Check
90+
runs-on: ubuntu-22.04
91+
needs: changed-files
92+
if: needs.changed-files.outputs.rust-lockfile == 'true'
93+
94+
env:
95+
RUSTFLAGS: "-D warnings"
96+
97+
steps:
98+
- uses: actions/[email protected]
99+
100+
- uses: Swatinem/[email protected]
101+
102+
- run: cargo install cargo-deny --vers ${{ env.CARGO_DENY_VERSION }}
103+
- run: cargo deny check
104+
80105
backend-test:
81106
name: Backend / Test
82107
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)