You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ke...@apache.org on 2022/06/22 02:10:30 UTC

[incubator-seatunnel] branch ci updated (2fcc8dee8 -> 7667d5415)

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

kezhenxu94 pushed a change to branch ci
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


 discard 2fcc8dee8 Improve CI jobs to reduce waiting time
     new 7667d5415 Improve CI jobs to reduce waiting time

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2fcc8dee8)
            \
             N -- N -- N   refs/heads/ci (7667d5415)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/backend.yml | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)


[incubator-seatunnel] 01/01: Improve CI jobs to reduce waiting time

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch ci
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git

commit 7667d5415dee6528f0ecfde1082b039e104d6b63
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Wed Jun 22 10:10:20 2022 +0800

    Improve CI jobs to reduce waiting time
---
 .github/workflows/backend.yml            | 187 ++++++++++++++++++++-----------
 .github/workflows/dead-link-checker.yaml |  36 ------
 tools/dependencies/checkLicense.sh       |   2 +-
 3 files changed, 125 insertions(+), 100 deletions(-)

diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index 7e196a909..ca273dc7d 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -3,13 +3,13 @@
 # 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 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,
+# 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.
@@ -29,84 +29,145 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  build-on-ubuntu:
-    name: Build-on-ubuntu
+  license-header:
+    if: github.repository == 'apache/incubator-seatunnel'
+    name: License header
     runs-on: ubuntu-latest
+    timeout-minutes: 10
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Check license header
+        uses: apache/skywalking-eyes@985866ce7e324454f61e22eb2db2e998db09d6f3
+
+  code-style:
+    if: github.repository == 'apache/incubator-seatunnel'
+    name: Code style
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Check code style
+        run: ./mvnw --batch-mode --quiet --no-snapshot-updates clean checkstyle:check
+
+  dead-link:
+    if: github.repository == 'apache/incubator-seatunnel'
+    name: Dead Links
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    steps:
+      - uses: actions/checkout@v2
+      - run: sudo npm install -g markdown-link-check@3.8.7
+      - run: |
+          for file in $(find . -name "*.md"); do
+            markdown-link-check -c .dlc.json -q "$file"
+          done
+
+  sanity-check:
+    if: github.repository == 'apache/incubator-seatunnel'
+    name: Sanity check results
+    needs: [ license-header, code-style, dead-link ]
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    steps:
+      - name: Check results
+        run: |
+          [[ ${{ needs.license-header.result }} == 'success' ]] || exit 1;
+          [[ ${{ needs.code-style.result }} == 'success' ]] || exit 1;
+          [[ ${{ needs.dead-link.result }} == 'success' ]] || exit 1;
+
+  build:
+    if: github.repository == 'apache/incubator-seatunnel'
+    name: Build
+    needs: [ sanity-check ]
+    strategy:
+      matrix:
+        java: [ '8', '11' ]
+        os: [ 'ubuntu-latest', 'windows-latest' ]
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 30
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+      - name: Build distribution tar
+        shell: bash
+        run: |-
+          ./mvnw -B install scalastyle:check
+                 -D"maven.test.skip"=true
+                 -D"checkstyle.skip"=true
+                 -D"license.skipAddThirdParty"=true
+                 -D"http.keepAlive"=false
+                 -D"maven.wagon.http.pool"=false
+                 -D"maven.wagon.http.retryHandler.count"=3
+                 -D"maven.wagon.httpconnectionManager.ttlSeconds"=120
+
+  dependency-license:
+    if: github.repository == 'apache/incubator-seatunnel'
+    name: Dependency licenses
+    needs: [ build ]
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: '8'
+          cache: 'maven'
+      - name: Check Dependencies Licenses
+        run: tools/dependencies/checkLicense.sh
+
+  unit-test:
+    name: Unit Test
+    runs-on: ${{ matrix.os }}
+    needs: [ sanity-check ]
     strategy:
       matrix:
-        java: ['8', '11']
+        java: [ '8', '11' ]
+        os: [ 'ubuntu-latest', 'windows-latest' ]
     timeout-minutes: 50
-    env:
-      MAVEN_OPTS: -Xmx2G -Xms2G
     steps:
       - uses: actions/checkout@v2
       - name: Set up JDK ${{ matrix.java }}
-        uses: actions/setup-java@v2
-        with:
-          java-version:  ${{ matrix.java }}
-          distribution: 'adopt'
-      - name: Cache local Maven repository
-        uses: actions/cache@v2
+        uses: actions/setup-java@v3
         with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - name: Check Style
-        run: |
-          ./mvnw -T 2C -B checkstyle:check --no-snapshot-updates
-      - name: Build and Package
-        run: |
-          ./mvnw -B install scalastyle:check \
-                 -Dmaven.test.skip=true \
-                 -Dcheckstyle.skip=true \
-                 -Dlicense.skipAddThirdParty=true \
-                 -Dhttp.keepAlive=false \
-                 -Dmaven.wagon.http.pool=false \
-                 -Dmaven.wagon.http.retryHandler.count=3 \
-                 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \
-                 --no-snapshot-updates
-      - name: Check dependency license
-        run: bash ./tools/dependencies/checkLicense.sh
+          java-version: ${{ matrix.java }}
+          distribution: 'temurin'
+          cache: 'maven'
       - name: Run Unit tests
+        shell: bash
         run: |
-          ./mvnw -T 2C -B clean verify -Dmaven.test.skip=false -Dcheckstyle.skip=true -Dscalastyle.skip=true -Dlicense.skipAddThirdParty=true --no-snapshot-updates
-      - name: Run Integration tests
-        run: |
-          ./mvnw -T 2C -B verify -DskipUT=true -DskipIT=false -Dcheckstyle.skip=true -Dscalastyle.skip=true -Dlicense.skipAddThirdParty=true --no-snapshot-updates
-  build-on-windows:
-    name: Build-on-windows
-    runs-on: windows-latest
+          ./mvnw -T 2C -B clean verify -D"maven.test.skip"=false -D"checkstyle.skip"=true -D"scalastyle.skip"=true -D"license.skipAddThirdParty"=true --no-snapshot-updates
+
+  integration-test:
+    name: Integration Test
+    runs-on: ${{ matrix.os }}
+    needs: [ sanity-check ]
     strategy:
       matrix:
-        java: ['8']
+        java: [ '8', '11' ]
+        os: [ 'ubuntu-latest', 'windows-latest' ]
     timeout-minutes: 50
-    env:
-      MAVEN_OPTS: -Xmx2G -Xms2G
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v2
       - name: Set up JDK ${{ matrix.java }}
         uses: actions/setup-java@v3
         with:
-          java-version:  ${{ matrix.java }}
+          java-version: ${{ matrix.java }}
           distribution: 'temurin'
           cache: 'maven'
-      - name: Cache local Maven repository
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - name: Check Style
-        shell: cmd
-        run: |
-          .\mvnw.cmd -T 2C -B checkstyle:check -nsu
-      - name: Build and Package
-        shell: cmd
-        run: |
-          .\mvnw.cmd -B install scalastyle:check -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dlicense.skipAddThirdParty=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -nsu
-      - name: Run Unit tests
-        shell: cmd
+      - name: Run Integration tests
+        shell: bash
         run: |
-          .\mvnw.cmd -T 2C -B clean verify -Dmaven.test.skip=false -Dcheckstyle.skip=true -Dscalastyle.skip=true -Dlicense.skipAddThirdParty=true -nsu
+          ./mvnw -T 2C -B verify -DskipUT=true -DskipIT=false -D"checkstyle.skip"=true -D"scalastyle.skip"=true -D"license.skipAddThirdParty"=true --no-snapshot-updates
diff --git a/.github/workflows/dead-link-checker.yaml b/.github/workflows/dead-link-checker.yaml
deleted file mode 100644
index 6090dc8df..000000000
--- a/.github/workflows/dead-link-checker.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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: Dead Link Checker
-
-on:
-  pull_request:
-
-concurrency:
-  group: dlc-${{ github.event.pull_request.number || github.ref }}
-  cancel-in-progress: true
-
-jobs:
-  CheckDeadLinks:
-    runs-on: ubuntu-latest
-    timeout-minutes: 30
-    steps:
-      - uses: actions/checkout@v2
-      - run: sudo npm install -g markdown-link-check@3.8.7
-      - run: |
-          for file in $(find . -name "*.md"); do
-            markdown-link-check -c .dlc.json -q "$file"
-          done
diff --git a/tools/dependencies/checkLicense.sh b/tools/dependencies/checkLicense.sh
index 526ccb25c..d9e0fd11e 100755
--- a/tools/dependencies/checkLicense.sh
+++ b/tools/dependencies/checkLicense.sh
@@ -17,7 +17,7 @@
 # limitations under the License.
 #
 
-./mvnw dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=/tmp/seatunnel-dependencies
+./mvnw -B dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=/tmp/seatunnel-dependencies
 
 # List all modules(jars) that belong to the SeaTunnel itself, these will be ignored when checking the dependency
 ls /tmp/seatunnel-dependencies | sort > all-dependencies.txt