Skip to content

Commit

Permalink
ci: add license check for python (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenplusplus authored Dec 13, 2023
1 parent c9e001d commit bb77981
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/.license_check.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Authorized and unauthorized licenses in LOWER CASE
[Licenses]
authorized_licenses:
3-clause bsd
apache
apache 2.0
apache software
apache software license
apache-2.0
bsd
bsd license
GNU Lesser General Public License v2 or later (LGPLv2+)
gnu lgpl
isc license
isc license (iscl)
lgpl with exceptions or zpl
mit
mit license
mozilla public license 2.0 (mpl 2.0)
MPL-2.0
new bsd
new bsd license
python software foundation
python software foundation license
simplified bsd
zpl 2.1

unauthorized_licenses:
gpl v3
24 changes: 24 additions & 0 deletions .github/workflows/pylicense.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Python License Check

on:
pull_request:
paths:
- 'common/python/**'
- 'vmsdk/python/**'
workflow_dispatch:

jobs:
python-license-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: License Check
run: |
set -ex
source setupenv.sh
python3 -m pip install liccheck
for f in $(find -type f -name "requirements.txt"); do
python3 -m pip install -r $f
liccheck -s .github/.license_check.ini -r $f
done

0 comments on commit bb77981

Please sign in to comment.