Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add checks for Python and npm package licenses #3383

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

flodolo
Copy link
Collaborator

@flodolo flodolo commented Sep 27, 2024

A few notes:

  1. I originally wanted to use licensecheck, because you don't need to install the dependencies with that tool. Unfortunately I can't seem to make it check other requirements files (filed issue here).
  2. For npm, license-checker hasn't been updated in a while, there's a fork. One general issue is that --failOn will print nothing when it fails (i.e. there is a GPL package), but if it doesn't fail it prints again the same output as license-checker. Opted to print a summary on the 2nd run.
  3. Given you need to install the dependencies for both, I opted to have the check as a step in existing workflows (originally I had them in a new separate workflow), and to install the 2 packages directly in the workflow.

@flodolo flodolo marked this pull request as draft September 27, 2024 14:24
@flodolo flodolo marked this pull request as ready for review September 27, 2024 14:24
@flodolo flodolo marked this pull request as draft September 27, 2024 14:27
@flodolo
Copy link
Collaborator Author

flodolo commented Sep 27, 2024

Modern development…

Npm 842 packages

├─ MIT: 705
├─ ISC: 42
├─ BSD-2-Clause: 28
├─ BSD-3-Clause: 27
├─ Apache-2.0: 25
├─ (MIT OR CC0-1.0): 3
├─ 0BSD: 2
├─ BSD: 2
├─ (Unlicense OR Apache-2.0): 1
├─ Python-2.0: 1
├─ CC-BY-4.0: 1
├─ (Apache-2.0 OR MPL-1.1): 1
├─ Custom: : 1
├─ Custom: https://www.highcharts.com/license: 1
├─ UNLICENSED: 1
└─ CC0-1.0: 1

Python only 108 packages.

@flodolo flodolo marked this pull request as ready for review September 27, 2024 14:41
@mathjazz mathjazz merged commit d54fccc into mozilla:main Sep 30, 2024
4 checks passed
@flodolo flodolo deleted the check_licenses branch September 30, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants