Skip to content

Commit

Permalink
move license checking to own job
Browse files Browse the repository at this point in the history
Signed-off-by: Lucca Baumgärtner <[email protected]>
  • Loading branch information
luccalb committed Oct 28, 2023
1 parent e448d59 commit 5fb5215
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,37 @@ permissions:
contents: read

jobs:
license:
name: License check
runs-on: ubuntu-22.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Dump all dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install
pipenv run pip freeze > requirements-all.txt
- name: Check copyright
id: license_check_report
uses: pilosus/action-pip-license-checker@v2
with:
requirements: "requirements-all.txt"
fail: "Copyleft"
totals: true
headers: true
- name: Print copyright report
run: echo "${{ steps.license_check_report.outputs.report }}"

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -29,19 +57,6 @@ jobs:
pip install flake8 pytest pipenv
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pipenv install
- name: Get all dependencies
run: |
pip freeze > requirements-all.txt
- name: Check copyright
id: license_check_report
uses: pilosus/action-pip-license-checker@v2
with:
requirements: "requirements-all.txt"
fail: "Copyleft"
verbose: 3
exclude: "(?i)^(pylint|aio[-_]*).*"
- name: Print copyright report
run: echo "${{ steps.license_check_report.outputs.report }}"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down

0 comments on commit 5fb5215

Please sign in to comment.