File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed
Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change 5454 run : |
5555 make install
5656
57+ - name : Check if project uses Poetry
58+ id : check_poetry
59+ run : |
60+ if [ -f pyproject.toml ] && grep -q '\[tool.poetry\]' pyproject.toml; then
61+ echo "uses_poetry=true" >> $GITHUB_OUTPUT
62+ else
63+ echo "uses_poetry=false" >> $GITHUB_OUTPUT
64+ fi
65+
66+ - name : Check licenses (Python)
67+ if : steps.check_poetry.outputs.uses_poetry == 'true'
68+ run : |
69+ #!/bin/bash
70+ set -euo pipefail
71+
72+ # Install pip-licenses if not already installed
73+ if ! poetry run pip show pip-licenses > /dev/null 2>&1; then
74+ poetry run pip install pip-licenses
75+ fi
76+
77+ LICENSES=$(poetry run pip-licenses)
78+ INCOMPATIBLE_LIBS=$(echo "$LICENSES" | grep 'GPL' || true)
79+
80+ if [[ -z $INCOMPATIBLE_LIBS ]]; then
81+ exit 0
82+ else
83+ echo "The following libraries were found which are not compatible with this project's license:"
84+ echo "$INCOMPATIBLE_LIBS"
85+ exit 1
86+ fi
87+
5788 - name : Generate and check SBOMs
5889 uses : NHSDigital/eps-action-sbom@v1
5990 with :
6596 name : SBOMS
6697 path : ' **/*sbom*.json'
6798
68- - name : Check licenses
69- run : make check-licenses
70-
7199 - name : Run linting for TypeScript and Python
72100 run : make lint
73101
You can’t perform that action at this time.
0 commit comments