Skip to content

Commit ac4d706

Browse files
Merge pull request #190 from eclipse-cdt-cloud/automated-pr-license-check
Add 3PP license check as part of PR CI
2 parents 3e337a7 + ab7c060 commit ac4d706

5 files changed

Lines changed: 71 additions & 2 deletions

File tree

Lines changed: 52 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ lerna-error.log*
3939

4040
*.vsix
4141
*.tsbuildinfo
42+
43+
license-check-summary.txt*

configs/license-check-config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"project": "ecd.cdt-cloud",
3+
"review": false,
4+
"inputFile": "yarn.lock",
5+
"batch": 50,
6+
"timeout": 200,
7+
"summary": "license-check-summary.txt"
8+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
"download:sample-traces": "curl -o TraceCompassTutorialTraces.tgz https://raw.githubusercontent.com/dorsal-lab/tracevizlab/master/labs/TraceCompassTutorialTraces.tgz; tar -xf TraceCompassTutorialTraces.tgz",
1414
"download:openvscode-server": "mkdir -p test-resources; cd test-resources; curl -L -o openvscode-server-v1.77.3-linux-x64.tar.gz https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.77.3/openvscode-server-v1.77.3-linux-x64.tar.gz; tar -xf openvscode-server-v1.77.3-linux-x64.tar.gz",
1515
"configure:openvscode-server": "cd test-resources/openvscode-server-v1.77.3-linux-x64/bin/; sed -i 's;\"$@\".*$;\"$@\" --without-connection-token --install-extension $ROOT/../../vscode-trace-extension/vscode-trace-extension-0.1.0.vsix --default-folder=$ROOT/../../TraceCompassTutorialTraces --start-server;g' openvscode-server",
16-
"start:openvscode-server": "cd test-resources/openvscode-server-v1.77.3-linux-x64/bin/; ./openvscode-server ${0}"
16+
"start:openvscode-server": "cd test-resources/openvscode-server-v1.77.3-linux-x64/bin/; ./openvscode-server ${0}",
17+
"license:check": "npx dash-licenses-wrapper --configFile=./configs/license-check-config.json",
18+
"license:check:review": "npx dash-licenses-wrapper --configFile=./configs/license-check-config.json --review"
1719
},
1820
"devDependencies": {
21+
"@eclipse-dash/nodejs-wrapper": "^0.0.1",
1922
"copy-webpack-plugin": "^11.0.0",
2023
"eslint-config-prettier": "^9.0.0",
2124
"lerna": "^7.0.0",

yarn.lock

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
resolved "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
7070
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
7171

72+
"@eclipse-dash/nodejs-wrapper@^0.0.1":
73+
version "0.0.1"
74+
resolved "https://registry.yarnpkg.com/@eclipse-dash/nodejs-wrapper/-/nodejs-wrapper-0.0.1.tgz#f2629671cf090a84c4d69a8fec42f198e583d103"
75+
integrity sha512-Rkk8O8hEVi/+LC/co7ly1zGLVwCNJG3yPbalsz1FHAqk6WZyEaWNf29EX6jz4vTfR5wpv2xAfF2yokKuStiOdA==
76+
7277
"@emotion/babel-plugin@^11.11.0":
7378
version "11.11.0"
7479
resolved "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz#c2d872b6a7767a9d176d007f5b31f7d504bb5d6c"
@@ -4967,7 +4972,6 @@ js-yaml@^3.10.0, js-yaml@^3.13.1, js-yaml@^3.9.1:
49674972

49684973
json-bigint@sidorares/json-bigint#2c0a5f896d7888e68e5f4ae3c7ea5cd42fd54473:
49694974
version "1.0.0"
4970-
uid "2c0a5f896d7888e68e5f4ae3c7ea5cd42fd54473"
49714975
resolved "https://codeload.github.com/sidorares/json-bigint/tar.gz/2c0a5f896d7888e68e5f4ae3c7ea5cd42fd54473"
49724976
dependencies:
49734977
bignumber.js "^9.0.0"

0 commit comments

Comments
 (0)