diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml new file mode 100644 index 0000000..acf51c0 --- /dev/null +++ b/.github/workflows/license-check.yml @@ -0,0 +1,40 @@ +name: Check licenses + +on: + pull_request: + branches: + - master + +jobs: + license_check: + runs-on: ubuntu-latest + steps: + - name: Set up Node + uses: actions/setup-node@v1 + with: + node-version: '16.14.2' + - name: Checkout Ref + uses: actions/checkout@v1 + - name: Install dependencies + run: npm install && npm install -g license-checker + - name: Generate license-checker CSV file + run: license-checker --start --production --csv --out npm-license-checker.csv + - name: Check license-checker CSV file without headers + id: license_check_report + uses: pilosus/action-pip-license-checker@v2 + with: + external: 'npm-license-checker.csv' + external-format: 'csv' + external-options: '{:skip-header true}' + fail: 'StrongCopyleft,NetworkCopyleft,Other,Error' + fails-only: true + exclude: 'evolv-ai*,SentientTechnologies*' + exclude-license: '(?i)copyright' + totals: true + verbose: 1 + github-token: ${{ secrets.GH_TOKEN }} + - name: Print incorrect dependencies (failure) + if: failure() + run: license-checker --start --production --exclude 'BSD, MIT, Apache-2.0' + + diff --git a/package-lock.json b/package-lock.json index 06efa1e..366e85f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,9 @@ "name": "@evolv/client", "version": "2.9.0", "license": "Apache-2.0", + "dependencies": { + "yui-lint": "^0.2.0" + }, "devDependencies": { "@istanbuljs/esm-loader-hook": "^0.1.2", "@peculiar/webcrypto": "^1.4.0", @@ -5305,6 +5308,11 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/yui-lint": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/yui-lint/-/yui-lint-0.2.0.tgz", + "integrity": "sha512-Xauxz4WDOmHaZHWvmi00wz7yiIYGe8Sha1voedIAZFzoqXvFblGiuxTQca+B6SHhD3uzd63wYJaQf7VkfUaEIw==" } }, "dependencies": { @@ -9356,6 +9364,11 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "yui-lint": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/yui-lint/-/yui-lint-0.2.0.tgz", + "integrity": "sha512-Xauxz4WDOmHaZHWvmi00wz7yiIYGe8Sha1voedIAZFzoqXvFblGiuxTQca+B6SHhD3uzd63wYJaQf7VkfUaEIw==" } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 22fc971..da1002a 100644 --- a/package.json +++ b/package.json @@ -78,11 +78,11 @@ "outdent": "^0.8.0", "rollup": "^2.78.1", "rollup-plugin-copy": "^3.4.0", + "sinon": "^15.0.3", "ts-node": "^10.9.1", "typescript": "^4.7.4", "xhr-mock": "^2.5.1", - "xmlhttprequest": "^1.8.0", - "sinon": "^15.0.3" + "xmlhttprequest": "^1.8.0" }, "mocha": { "extension": [ @@ -99,5 +99,8 @@ "exclude": [ "**/*.test.js" ] + }, + "dependencies": { + "yui-lint": "^0.2.0" } }