Skip to content

Commit e58ca0b

Browse files
committed
Integrate License Check
* with automatic review Contributed on behalf of STMicroelectronics
1 parent 61f6194 commit e58ca0b

File tree

5 files changed

+71
-2
lines changed

5 files changed

+71
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: 3PP License Check
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
13+
14+
jobs:
15+
16+
License-check:
17+
name: 3PP License Check using dash-licenses
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest]
23+
node: [18]
24+
java: [11]
25+
26+
runs-on: ${{ matrix.os }}
27+
timeout-minutes: 20
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 2
34+
35+
- name: Use Node.js ${{ matrix.node }}
36+
uses: actions/setup-node@v3
37+
with:
38+
node-version: ${{ matrix.node }}
39+
40+
- name: Use Java ${{ matrix.java }}
41+
uses: actions/setup-java@v3
42+
with:
43+
distribution: 'adopt'
44+
java-version: ${{ matrix.java }}
45+
46+
- name: Run dash-licenses
47+
shell: bash
48+
run: |
49+
yarn --frozen-lockfile --ignore-scripts
50+
yarn license:check
51+
env:
52+
DASH_TOKEN: ${{ secrets.DASH_LICENSES_PAT }}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
**/gen-webpack.node.config.js
99
**/plugins
1010
**/tsconfig.tsbuildinfo
11-
*.log
11+
*.log
12+
license-check-summary.txt*

configs/license-check-config.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"project": "ecd.theia",
3+
"review": true,
4+
"inputFile": "yarn.lock",
5+
"batch": 50,
6+
"timeout": 200,
7+
"summary": "license-check-summary.txt"
8+
}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"node": ">=12.14.1"
1717
},
1818
"devDependencies": {
19+
"@eclipse-dash/nodejs-wrapper": "^0.0.1",
1920
"@theia/cli": "1.47.1",
2021
"@typescript-eslint/eslint-plugin": "^4.25.0",
2122
"@typescript-eslint/eslint-plugin-tslint": "^4.25.0",
@@ -49,7 +50,9 @@
4950
"browser": "yarn --cwd applications/browser",
5051
"update:next": "ts-node scripts/update-theia-to-next.ts && lerna run update:next",
5152
"lint": "eslint --ext js,jsx,ts,tsx scripts && lerna run lint",
52-
"lint:fix": "eslint --ext js,jsx,ts,tsx scripts --fix && lerna run lint:fix"
53+
"lint:fix": "eslint --ext js,jsx,ts,tsx scripts --fix && lerna run lint:fix",
54+
"license:check": "npx dash-licenses-wrapper --configFile=./configs/license-check-config.json",
55+
"license:check:review": "npx dash-licenses-wrapper --configFile=./configs/license-check-config.json --review"
5356
},
5457
"theiaPluginsDir": "plugins",
5558
"theiaPlugins": {

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,11 @@
996996
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
997997
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
998998

999+
"@eclipse-dash/nodejs-wrapper@^0.0.1":
1000+
version "0.0.1"
1001+
resolved "https://registry.yarnpkg.com/@eclipse-dash/nodejs-wrapper/-/nodejs-wrapper-0.0.1.tgz#f2629671cf090a84c4d69a8fec42f198e583d103"
1002+
integrity sha512-Rkk8O8hEVi/+LC/co7ly1zGLVwCNJG3yPbalsz1FHAqk6WZyEaWNf29EX6jz4vTfR5wpv2xAfF2yokKuStiOdA==
1003+
9991004
"@electron/get@^2.0.0", "@electron/get@^2.0.1":
10001005
version "2.0.3"
10011006
resolved "https://registry.yarnpkg.com/@electron/get/-/get-2.0.3.tgz#fba552683d387aebd9f3fcadbcafc8e12ee4f960"

0 commit comments

Comments
 (0)