Skip to content

Commit 528388c

Browse files
Add github actions for ci and license check.
1 parent eb0a9a0 commit 528388c

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Copyright 2019 WeBank.
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
name: DataSphereStudio CI Actions
20+
21+
on:
22+
push:
23+
pull_request:
24+
25+
jobs:
26+
build:
27+
28+
runs-on: ubuntu-latest
29+
30+
strategy:
31+
matrix:
32+
node-version: [14.17.3]
33+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
- name: Set up JDK 8
39+
uses: actions/setup-java@v2
40+
with:
41+
distribution: 'adopt'
42+
java-version: 8
43+
- name: Use Node.js ${{ matrix.node-version }}
44+
uses: actions/setup-node@v2
45+
with:
46+
node-version: ${{ matrix.node-version }}
47+
- name: Build backend by maven
48+
run: |
49+
mvn -N install
50+
mvn clean package
51+
- name: Build frontend by node.js
52+
run: |
53+
cd web
54+
npm install
55+
npm run build

.github/workflows/check_license.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#
2+
# Copyright 2019 WeBank.
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
name: DataSphereStudio License check
22+
23+
on: [push, pull_request]
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout source
30+
uses: actions/checkout@v2
31+
- name: Set up JDK 8
32+
uses: actions/setup-java@v2
33+
with:
34+
java-version: '8'
35+
distribution: 'adopt'
36+
- name: mvn -N install
37+
run:
38+
mvn -N install
39+
- name: License check with Maven
40+
run: |
41+
rat_file=`mvn apache-rat:check | { grep -oe "\\S\\+/rat.txt" || true; }`
42+
echo "rat_file=$rat_file"
43+
if [[ -n "$rat_file" ]];then echo "check error!" && cat $rat_file && exit 123;else echo "check success!" ;fi
44+
- name: Upload the report
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: license-check-report
48+
path: "**/target/rat.txt"

0 commit comments

Comments
 (0)