Skip to content

test: enrichment table testcase (#5313) #1

test: enrichment table testcase (#5313)

test: enrichment table testcase (#5313) #1

name: "JS Licenses checker"
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
jobs:
js-license-check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout latest code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Build frontend code
run: |
results=$(git show --name-only HEAD | grep "package.*.json")
if [ -z "$result" ]; then
echo "No package.json or package-lock.json files changed. Skipping license check."
exit 0
fi
cd web && npm install && npm run build
- name: Check licenses
run: |
results=$(git show --name-only HEAD | grep "package.*.json")
if [ -z "$result" ]; then
echo "No package.json or package-lock.json files changed. Skipping license check."
exit 0
fi
npm install -g license-checker
cd web && npx -q --yes license-checker --production --json --onlyAllow="MIT;ISC;Apache-2.0;BSD;MPL-2.0;Unlicense;CC-BY-4.0;Artistic-2.0;UNLICENSED"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ toJson(github) }}