CI/CD: Add cargo deny job to GitHub Actions.
This commit is contained in:
parent
3b1ece45ef
commit
72dab40d97
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@ -36,6 +36,24 @@ jobs:
|
||||
# TODO: Add `--all-features`:
|
||||
- run: cargo +1.37.0 clippy ---all-targets -- --deny warnings
|
||||
|
||||
deny:
|
||||
# Don't run duplicate `push` jobs for the repo owner's PRs.
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
|
||||
- run: cargo install cargo-deny
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: cargo deny check
|
||||
|
||||
test:
|
||||
# Don't run duplicate `push` jobs for the repo owner's PRs.
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
28
deny.toml
Normal file
28
deny.toml
Normal file
@ -0,0 +1,28 @@
|
||||
[advisories]
|
||||
unmaintained = "deny"
|
||||
yanked = "deny"
|
||||
notice = "deny"
|
||||
|
||||
[licenses]
|
||||
allow = [
|
||||
"Apache-2.0",
|
||||
"ISC",
|
||||
"LicenseRef-ring",
|
||||
"MIT",
|
||||
]
|
||||
confidence-threshold = 1.0
|
||||
|
||||
[[licenses.clarify]]
|
||||
name = "ring"
|
||||
expression = "LicenseRef-ring"
|
||||
license-files = [
|
||||
{ path = "LICENSE", hash = 0xbd0eed23 },
|
||||
]
|
||||
|
||||
[bans]
|
||||
multiple-versions = "deny"
|
||||
wildcards = "deny"
|
||||
|
||||
[sources]
|
||||
unknown-registry = "deny"
|
||||
unknown-git = "deny"
|
Loading…
x
Reference in New Issue
Block a user