Skip to content

Commit

Permalink
feat: Add Cargo Deny license check to CI workflow (#131)
Browse files Browse the repository at this point in the history
* feat: Add Cargo Deny license check to CI workflow

Signed-off-by: Ruihang Xia <[email protected]>

* only check license

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia authored Oct 24, 2024
1 parent df191dc commit e260f54
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ jobs:
- name: Run cargo clippy
run: cargo clippy --workspace --all-targets ${{ matrix.features }} -- -D warnings

cargo-deny:
name: Cargo Deny License Check
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check license

coverage:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down
30 changes: 30 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[licenses]
allow = [
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"MIT",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
]
exceptions = [
{ allow = ["Unicode-DFS-2016"], name = "unicode-ident" },
]
version = 2

0 comments on commit e260f54

Please sign in to comment.