ci: license report from a clean venv, not the runner's site-packages
This commit is contained in:
@@ -84,17 +84,22 @@ jobs:
|
|||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: requirements.txt
|
cache-dependency-path: requirements.txt
|
||||||
|
|
||||||
- name: Install
|
# A fresh venv, not the runner's site-packages: the report must list the
|
||||||
|
# project's runtime deps, not whatever the runner image or a previous
|
||||||
|
# workflow happened to leave installed (semgrep once showed up here).
|
||||||
|
- name: Install into a clean venv
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip --root-user-action=ignore
|
python -m venv .lic && . .lic/bin/activate
|
||||||
|
pip install --upgrade pip --root-user-action=ignore
|
||||||
pip install --root-user-action=ignore -r requirements.txt pip-licenses
|
pip install --root-user-action=ignore -r requirements.txt pip-licenses
|
||||||
|
|
||||||
- name: Report
|
- name: Report
|
||||||
run: |
|
run: |
|
||||||
|
. .lic/bin/activate
|
||||||
pip-licenses --format=markdown --with-urls --output-file=licenses.md
|
pip-licenses --format=markdown --with-urls --output-file=licenses.md
|
||||||
pip-licenses --format=json --output-file=licenses.json
|
pip-licenses --format=json --output-file=licenses.json
|
||||||
echo "Copyleft licenses among runtime deps (informational):"
|
echo "Copyleft licenses among runtime deps (informational; LGPL is fine to link from MIT):"
|
||||||
pip-licenses --format=plain | grep -iE 'GPL|AGPL|LGPL' || echo " none"
|
pip-licenses --format=plain --ignore-packages pip-licenses | grep -iE 'GPL|AGPL|LGPL' || echo " none"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user