Skip to content

Merge pull request #1005 from Smartappli/dependabot/uv/services/FARM/… #1102

Merge pull request #1005 from Smartappli/dependabot/uv/services/FARM/…

Merge pull request #1005 from Smartappli/dependabot/uv/services/FARM/… #1102

name: Global License Checker
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_call:
workflow_dispatch:
concurrency:
group: global-license-check-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
license-check:
name: License Check (${{ matrix.service }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- service: aimer-web
path: services/aimer-web
- service: MAGE
path: services/MAGE
- service: FARM
path: services/FARM
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Setup uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Install Python 3.13
run: uv python install 3.13
- name: Export locked runtime requirements
working-directory: ${{ matrix.path }}
run: |
mkdir -p "${GITHUB_WORKSPACE}/artifacts"
uv export --locked --no-dev --format requirements-txt --output-file "${GITHUB_WORKSPACE}/artifacts/${{ matrix.service }}-requirements.txt"
- name: Check Python licenses
id: license_check_report
uses: pilosus/action-pip-license-checker@e909b0226ff49d3235c99c4585bc617f49fff16a
with:
requirements: artifacts/${{ matrix.service }}-requirements.txt
fail: NetworkCopyleft
exclude: (?i)^(pylint|tbb|nvidia|aio[-_]*).*
verbose: 1
github-token: ${{ github.token }}
- name: Save report
if: ${{ always() }}
run: printf '%s' '${{ steps.license_check_report.outputs.report }}' > "license-report-${{ matrix.service }}.json"
- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: license-report-${{ matrix.service }}
path: |
license-report-${{ matrix.service }}.json
artifacts/${{ matrix.service }}-requirements.txt
if-no-files-found: error