-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for duplicate dependencies in CI (#172)
* Setup dependencies CI * eof * Remove bors stuff * Ignoring packages in dev-dependencies * Update deny.toml * Update deny.toml
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Dependencies | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/Cargo.toml' | ||
- 'deny.toml' | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
- 'deny.toml' | ||
branches-ignore: | ||
- 'dependabot/**' | ||
# schedule: | ||
# - cron: "0 0 * * 0" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check-advisories: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-deny | ||
run: cargo install cargo-deny | ||
- name: Check for security advisories and unmaintained crates | ||
run: cargo deny check advisories | ||
|
||
check-bans: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-deny | ||
run: cargo install cargo-deny | ||
- name: Check for banned and duplicated dependencies | ||
run: cargo deny check bans | ||
|
||
check-licenses: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-deny | ||
run: cargo install cargo-deny | ||
- name: Check for unauthorized licenses | ||
run: cargo deny check licenses | ||
|
||
check-sources: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-deny | ||
run: cargo install cargo-deny | ||
- name: Checked for unauthorized crate sources | ||
run: cargo deny check sources |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[advisories] | ||
db-path = "~/.cargo/advisory-db" | ||
db-urls = ["https://github.com/rustsec/advisory-db"] | ||
vulnerability = "deny" | ||
unmaintained = "deny" | ||
yanked = "deny" | ||
notice = "deny" | ||
ignore = [ | ||
"RUSTSEC-2021-0127" # from serde_cbor | ||
] | ||
|
||
[licenses] | ||
unlicensed = "deny" | ||
copyleft = "deny" | ||
allow = [ | ||
"MIT", | ||
"MIT-0", | ||
"Apache-2.0", | ||
"BSD-3-Clause", | ||
"ISC", | ||
"Zlib", | ||
"0BSD", | ||
"BSD-2-Clause", | ||
"CC0-1.0", | ||
] | ||
default = "deny" | ||
|
||
[bans] | ||
multiple-versions = "deny" | ||
wildcards = "deny" | ||
highlight = "all" | ||
# Certain crates/versions that will be skipped when doing duplicate detection. | ||
skip = [ | ||
{ name = "itoa", version = "1.0.2" } | ||
] | ||
|
||
[sources] | ||
unknown-registry = "deny" | ||
unknown-git = "deny" | ||
allow-registry = ["https://github.com/rust-lang/crates.io-index"] | ||
allow-git = [] |