You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ja...@apache.org on 2022/09/04 13:21:56 UTC

[incubator-linkis] branch dev-1.3.0 updated: [ISSUE-3227] Optimize git action (#3228)

This is an automated email from the ASF dual-hosted git repository.

jackxu2011 pushed a commit to branch dev-1.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
     new 326132969 [ISSUE-3227] Optimize git action  (#3228)
326132969 is described below

commit 326132969fac7de658b7a3602d24b3e508847a79
Author: Casion <ca...@gmail.com>
AuthorDate: Sun Sep 4 21:21:50 2022 +0800

    [ISSUE-3227] Optimize git action  (#3228)
    
    * optimize git action
---
 .codecov.yml                                       | 53 ++++++++++++++++++++++
 .github/workflows/auto-comment.yml                 | 23 ++++++----
 .github/workflows/{build.yml => build-backend.yml} | 28 ++----------
 .github/workflows/build-frontend.yml               | 53 ++++++++++++++++++++++
 ...ead-link-checker.yaml => check-code-format.yml} | 29 ++++++------
 .../{check_license.yml => check-license.yml}       |  4 +-
 ...cies.yml => check-third-party-dependencies.yml} |  4 +-
 .github/workflows/dead-link-checker.yaml           | 12 +++--
 .github/workflows/publish-docker.yaml              |  2 +-
 9 files changed, 152 insertions(+), 56 deletions(-)

diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 000000000..b08292c0a
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,53 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Test using:
+#   curl --data-binary @.github/codecov.yml https://codecov.io/validate
+#
+# https://docs.codecov.io/docs/codecovyml-reference
+codecov:
+  require_ci_to_pass: no
+
+coverage:
+  precision: 2
+  round: down
+  range: "20...100"
+#   Add status message to PRs.
+  status:
+    project:
+      default:
+        #todo  adjust later
+        target: 15%  #overall project/ repo coverage
+
+parsers:
+  gcov:
+    branch_detection:
+      conditional: yes
+      loop: yes
+      method: no
+      macro: no
+
+github_checks:
+  annotations: false
+
+ignore:
+  - "**/entity/*"
+  - "**/exception/*"
+
+# See https://docs.codecov.com/docs/flags for options.
+flag_management:
+  default_rules: # the rules that will be followed for any flag added, generally
+    carryforward: true # recommended for multi-lang mono-repos.
\ No newline at end of file
diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml
index f1b0155a5..0c96029b4 100644
--- a/.github/workflows/auto-comment.yml
+++ b/.github/workflows/auto-comment.yml
@@ -31,20 +31,25 @@ jobs:
           token: ${{ secrets.GITHUB_TOKEN }}
           issue-number: ${{ github.event.issue.number }}
           body: |
-            :blush:  Welcome to the Apache Linkis (incubating) community!!
+            ## :blush:  Welcome to the Apache Linkis (incubating) community!!
             We are glad that you are contributing by opening this issue.
-            
+
             Please make sure to include all the relevant context.
             We will be here shortly.
-            
+
             If you are interested in contributing to our website project, please let us know!
-            You can check out our contributing guide on 
+            You can check out our contributing guide on
              :point_right:  [How to Participate in Project Contribution](https://linkis.apache.org/community/how-to-contribute).
-             
-            WeChat  Group:
-            
-            ![image](https://linkis.apache.org/Images/wedatasphere_contact_01.png)
-            Mailing Lists:
+
+
+            ### Community
+
+            |WeChat Assistant|WeChat Public Account|
+            |-|-|
+            |<img src="https://linkis.apache.org/Images/wedatasphere_contact_01.png" width="128"/>|<img src="https://linkis.apache.org/Images/gzh_01.png" width="128"/>|
+
+
+            ### Mailing Lists
             |name|description|Subscribe|Unsubscribe|archive|
             |:-----|:--------|:------|:-------|:-----|
             | [dev@linkis.apache.org](mailto:dev@linkis.apache.org) | community activity information | [subscribe](mailto:dev-subscribe@linkis.apache.org) | [unsubscribe](mailto:dev-unsubscribe@linkis.apache.org) | [archive](http://mail-archives.apache.org/mod_mbox/linkis-dev) |
diff --git a/.github/workflows/build.yml b/.github/workflows/build-backend.yml
similarity index 72%
rename from .github/workflows/build.yml
rename to .github/workflows/build-backend.yml
index 0f8f2cd01..8b694ed15 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build-backend.yml
@@ -15,25 +15,17 @@
 # limitations under the License.
 #
 
-name: Build
+name: Build Backend
 
-on:
-  push:
-  pull_request:
+on: [push, pull_request]
 
 env:
   MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
 
 jobs:
-  build:
-
+  build-backend:
     runs-on: ubuntu-latest
 
-    strategy:
-      matrix:
-        node-version: [14.17.3]
-        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
-
     steps:
     - name: Checkout
       uses: actions/checkout@v2
@@ -42,14 +34,7 @@ jobs:
       with:
         distribution: 'adopt'
         java-version: 8
-    - name: Use Node.js ${{ matrix.node-version }}
-      uses: actions/setup-node@v2
-      with:
-        node-version: ${{ matrix.node-version }}
-    - name: Code format check
-      run: |
-          ./mvnw -N install
-          ./mvnw spotless:check
+
     - name: Build backend by maven
       run: |
           ./mvnw -N install
@@ -58,8 +43,3 @@ jobs:
       uses: codecov/codecov-action@v3.0.0
 #      with:
 #        token: ${{ secrets.CODECOV_TOKEN }}
-    - name: Build frontend by node.js
-      run: |
-          cd linkis-web
-          npm install
-          npm run build
diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml
new file mode 100644
index 000000000..210cce095
--- /dev/null
+++ b/.github/workflows/build-frontend.yml
@@ -0,0 +1,53 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Build Frontend
+
+on: [push, pull_request]
+
+
+jobs:
+  build-frontend:
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [14]
+        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+
+      - uses: actions/cache@v2
+        with:
+          path: ~/.npm
+          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+          restore-keys: |
+            ${{ runner.os }}-node-
+
+      - name: Set Up NodeJS ${{ matrix.node-version }}
+        uses: actions/setup-node@v2-beta
+        with:
+          node-version: ${{ matrix.node-version }}
+
+      - name: Build frontend by node.js
+        run: |
+            cd linkis-web
+            npm install
+            npm run build
diff --git a/.github/workflows/dead-link-checker.yaml b/.github/workflows/check-code-format.yml
similarity index 69%
copy from .github/workflows/dead-link-checker.yaml
copy to .github/workflows/check-code-format.yml
index 8ab68a2c5..21ae2ec4d 100644
--- a/.github/workflows/dead-link-checker.yaml
+++ b/.github/workflows/check-code-format.yml
@@ -14,20 +14,23 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-on:
-  pull_request
-  
- 
+
+name: Code Format Check
+
+on: [push, pull_request]
+
 jobs:
-  CheckDeadLinks:
+  spotless-check:
     runs-on: ubuntu-latest
-    timeout-minutes: 30
-    if: (github.repository == 'apache/incubator-linkis')
     steps:
-      - uses: actions/checkout@v3
-      - uses: gaurav-nelson/github-action-markdown-link-check@v1
+      - name: Checkout source
+        uses: actions/checkout@v2
+      - name: Set up JDK 8
+        uses: actions/setup-java@v2
         with:
-          use-quiet-mode: 'no'
-          use-verbose-mode: 'yes'
-          folder-path: '../'
-          config-file: '.github/workflows/dlc.json'
+          java-version: '8'
+          distribution: 'adopt'
+      - name: Code format check
+        run: |
+          ./mvnw -N install
+          ./mvnw spotless:check
diff --git a/.github/workflows/check_license.yml b/.github/workflows/check-license.yml
similarity index 97%
rename from .github/workflows/check_license.yml
rename to .github/workflows/check-license.yml
index fad2c0437..c2d1d6c4a 100644
--- a/.github/workflows/check_license.yml
+++ b/.github/workflows/check-license.yml
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: License check
+name: License Check
 
 on: [push, pull_request]
 
 jobs:
-  build:
+  apache-rat-check:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout source
diff --git a/.github/workflows/check_third_party_dependencies.yml b/.github/workflows/check-third-party-dependencies.yml
similarity index 96%
rename from .github/workflows/check_third_party_dependencies.yml
rename to .github/workflows/check-third-party-dependencies.yml
index 7bf433eb7..25fb0bd7f 100644
--- a/.github/workflows/check_third_party_dependencies.yml
+++ b/.github/workflows/check-third-party-dependencies.yml
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: third-party dependencies check
+name: Third-party Dependencies Check
 
 on: [push, pull_request]
 
@@ -23,7 +23,7 @@ env:
   MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
 
 jobs:
-  build:
+  third-party-dependencies-check-:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout source
diff --git a/.github/workflows/dead-link-checker.yaml b/.github/workflows/dead-link-checker.yaml
index 8ab68a2c5..68fc1258c 100644
--- a/.github/workflows/dead-link-checker.yaml
+++ b/.github/workflows/dead-link-checker.yaml
@@ -14,12 +14,14 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-on:
-  pull_request
-  
- 
+
+
+name: Dead Link Check
+
+on: [push, pull_request]
+
 jobs:
-  CheckDeadLinks:
+  dead-links-check:
     runs-on: ubuntu-latest
     timeout-minutes: 30
     if: (github.repository == 'apache/incubator-linkis')
diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml
index a52208031..2c69906e3 100644
--- a/.github/workflows/publish-docker.yaml
+++ b/.github/workflows/publish-docker.yaml
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-name: publish-docker
+name: Publish Docker
 on: 
   push:
     branches:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org