Skip to content

Commit

Permalink
Merge pull request #416 from emcek/license_check
Browse files Browse the repository at this point in the history
Add license checker
  • Loading branch information
emcek authored Dec 4, 2024
2 parents 9c72b5c + 2f32744 commit 8d07d4f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check License

on: workflow_call

jobs:
license_check:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Set up Python 3.13"
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip

- name: "Install requirements"
run: |
python -m pip install -U pip
python -m pip install -U -r requirements.txt
- name: "Get explicit and transitive dependencies"
run: |
pip freeze > requirements-all.txt
- name: "Check License"
id: license_check_report
uses: pilosus/action-pip-license-checker@v2
with:
requirements: 'requirements-all.txt'
fail: 'StrongCopyleft,Other,Error'
totals: true
headers: true

- name: "Print report"
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
4 changes: 4 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
needs: [ style ]
uses: ./.github/workflows/test.yml

license:
needs: [ style ]
uses: ./.github/workflows/license.yml

coverage:
needs: [ style ]
uses: ./.github/workflows/coverage.yml
Expand Down

0 comments on commit 8d07d4f

Please sign in to comment.