-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (37 loc) · 1.08 KB
/
deplic.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Finds dependencies with problematic licenses: either no license,
# or incompatible with MPL.
name: Check licenses of dependencies
on:
pull_request:
push:
branches:
- master
jobs:
deplic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install tools
run: |
sudo apt install -y jq
python -m pip install dep-license
- name: Run deplic
# deplic can take a config file with problematic licenses,
# but it doesn't seem to allow adding exceptions for specific
# packages. flake8-builtins is ok, because we don't import it,
# we just check code with it.
#
# The tail command skips deplic's status messages.
run: >
deplic -f json . |
tail -n +4 |
jq '
map(select(
.Meta == "" and .Classifier == ""
or (.Meta | startswith("GPL")) and (.Name != "flake8-builtins")
)) | if length > 0 then halt_error(1) else . end
'