From 5fb52152c5345511b83f5eb994e1665096cf7414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucca=20Baumg=C3=A4rtner?= Date: Sat, 28 Oct 2023 11:50:14 +0200 Subject: [PATCH] move license checking to own job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucca Baumgärtner --- .github/workflows/python-app.yml | 43 +++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4866b6d..eee5116 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -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: @@ -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