-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: licence checker * ci: added PR build test * chore: audit fix * fix: updated sasjs/cli - vulnerabilities fix * fix: anguar build version match * ci: removed ng test
- Loading branch information
1 parent
5f0ae58
commit 735a8ae
Showing
4 changed files
with
3,063 additions
and
2,571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: PR Build and Test | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [lts/hydrogen] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
|
||
- name: Check npm audit | ||
run: npm audit --production --audit-level=low | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Check code style | ||
run: npm run lint | ||
|
||
- name: Run licence checker | ||
run: npm run license-checker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const licenseChecker = require('license-checker') | ||
|
||
const check = (cwd) => { | ||
return new Promise((resolve, reject) => { | ||
licenseChecker.init( | ||
{ | ||
production: true, | ||
start: cwd, | ||
excludePrivatePackages: true, | ||
onlyAllow: | ||
'AFLv2.1;Apache 2.0;Apache-2.0;Apache*;Artistic-2.0;0BSD;BSD*;BSD-2-Clause;BSD-3-Clause;CC0-1.0;CC-BY-3.0;CC-BY-4.0;ISC;MIT;MPL-2.0;ODC-By-1.0;Python-2.0;Unlicense;', | ||
excludePackages: | ||
'@cds/[email protected]' | ||
}, | ||
(error, json) => { | ||
if (error) { | ||
reject(error) | ||
} else { | ||
resolve(json) | ||
} | ||
} | ||
) | ||
}) | ||
} | ||
|
||
check(process.cwd(), true) | ||
.then((res) => console.log('All packages are licensed properly')) | ||
.catch((err) => console.log('license checker err', err)) |
Oops, something went wrong.