-
Notifications
You must be signed in to change notification settings - Fork 196
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
Automatic license check for Python #1102
base: main
Are you sure you want to change the base?
Automatic license check for Python #1102
Conversation
with: | ||
python-version: '3.7' | ||
|
||
- name: Cache Poetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be problematic as we have gitignore for poetry.lock. In this case, it won't invalid the cache right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good point, we need to have poetry.lock
in order to cache this properly and we could even use this config cache: 'poetry'
of actions/setup-python@v4
GitHub action (here's this docs section).
Without having poetry.lock
we can only cache based on pyptoject.toml
which doesn't cover transitive dependencies.
I've also thought about generating poetry.lock
on CI but for this we need to have poetry first and when we install poetry, it installs dependencies as well - so, it wouldn't work
What about removing poetry.lock from .gitignore and creating it and managing for the future changes? 🤔
Or is it good enough to create a hash key based on myproject.toml
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Check Licenses | ||
working-directory: regtests/client/python | ||
run: | | ||
pip-licenses --partial-match --fail-on="GPL;AGPL;LGPL;SSPL;EPL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbonofre can u help review if this rule is sufficient?
#822
Here's what it looks like when it passes:
And here's what it looks like when it doesn't pass: