Improve license check to output failing package names
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 33s
CI / Security audit (push) Successful in 55s
CI / Tests & coverage (push) Failing after 1m1s
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 33s
CI / Security audit (push) Successful in 55s
CI / Tests & coverage (push) Failing after 1m1s
When license compatibility check fails, now outputs full license report showing which packages have incompatible licenses.
This commit is contained in:
@@ -40,10 +40,21 @@ jobs:
|
||||
|
||||
- name: Check licence compatibility
|
||||
run: |
|
||||
npx --yes license-checker --production \
|
||||
# First, output all production licenses for visibility
|
||||
echo "Checking production dependency licenses..."
|
||||
npx --yes license-checker --production --excludePrivatePackages --json > /tmp/licenses.json
|
||||
|
||||
# Check for incompatible licenses
|
||||
if ! npx --yes license-checker --production \
|
||||
--onlyAllow "MIT;ISC;MIT-0;BSD-2-Clause;BSD-3-Clause;Apache-2.0;CC0-1.0;BlueOak-1.0.0" \
|
||||
--excludePrivatePackages \
|
||||
&& echo "All production dependency licences are compatible with MIT."
|
||||
--excludePrivatePackages; then
|
||||
echo ""
|
||||
echo "❌ Found incompatible licenses. Full license report:"
|
||||
cat /tmp/licenses.json
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ All production dependency licences are compatible with MIT."
|
||||
|
||||
- name: Check copyright headers in source files
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user