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/21 13:36:31 UTC

[incubator-seatunnel] branch ci created (now 70793dac0)

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


      at 70793dac0 Improve CI jobs to reduce waiting time

This branch includes the following new commits:

     new 70793dac0 Improve CI jobs to reduce waiting time

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.



[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 70793dac01c42a9268164394d7d8267da86173e7
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Tue Jun 21 21:36:19 2022 +0800

    Improve CI jobs to reduce waiting time
---
 .github/workflows/backend.yml | 163 +++++++++++++++++++++++++++---------------
 1 file changed, 107 insertions(+), 56 deletions(-)

diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index 7e196a909..afffdd03d 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -19,43 +19,96 @@ name: Backend
 
 on:
   push:
+    branches:
+      - ci
   pull_request:
     paths-ignore:
-      - 'docs/**'
-      - '**/*.md'
+      - "docs/**"
+      - "**/*.md"
 
 concurrency:
   group: backend-${{ github.event.pull_request.number || github.ref }}
   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 --quiet --no-snapshot-updates clean checkstyle:check
+
+  dependency-license:
+    if: github.repository == "apache/incubator-seatunnel"
+    name: Dependency licenses
+    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'
+      - uses: actions/download-artifact@v3
+        with:
+          name: dist
+          path: dist
+      - name: Check Dependencies Licenses
+        run: tools/dependencies/check-LICENSE.sh
+
+  sanity-check:
+    if: github.repository == "apache/incubator-seatunnel"
+    name: Sanity check results
+    needs: [ license-header, dependency-license, code-style ]
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    steps:
+      - name: Check results
+        run: |
+          [[ ${{ needs.dependency-license.result }} == 'success' ]] || exit 1;
+          [[ ${{ needs.license-header.result }} == 'success' ]] || exit 1;
+          [[ ${{ needs.code-style.result }} == 'success' ]] || exit 1;
+
+  build:
+    if: github.repository == "apache/incubator-seatunnel"
+    name: Build
+    needs: [ sanity-check ]
     strategy:
       matrix:
-        java: ['8', '11']
-    timeout-minutes: 50
-    env:
-      MAVEN_OPTS: -Xmx2G -Xms2G
+        java: [ "8", "11" ]
+        os: [ "ubuntu-latest", "windows-latest" ]
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 30
     steps:
-      - uses: actions/checkout@v2
-      - name: Set up JDK ${{ matrix.java }}
-        uses: actions/setup-java@v2
+      - uses: actions/checkout@v3
         with:
-          java-version:  ${{ matrix.java }}
-          distribution: 'adopt'
-      - name: Cache local Maven repository
-        uses: actions/cache@v2
+          submodules: true
+      - 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
+          distribution: 'temurin'
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+      - name: Build distribution tar
         run: |
           ./mvnw -B install scalastyle:check \
                  -Dmaven.test.skip=true \
@@ -66,47 +119,45 @@ jobs:
                  -Dmaven.wagon.http.retryHandler.count=3 \
                  -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \
                  --no-snapshot-updates
-      - name: Check dependency license
-        run: bash ./tools/dependencies/checkLicense.sh
+
+  unit-test:
+    name: Unit Test
+    runs-on: ${{ matrix.os }}
+    needs: [ sanity-check ]
+    strategy:
+      matrix:
+        java: [ "8", "11" ]
+        os: [ "ubuntu-latest", "windows-latest" ]
+    timeout-minutes: 50
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v3
+        with:
+          java-version: ${{ matrix.java }}
+          distribution: "temurin"
+          cache: "maven"
       - name: Run Unit tests
         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
+
+  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 }}
-          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
+          java-version: ${{ matrix.java }}
+          distribution: "temurin"
+          cache: "maven"
+      - name: Run Integration tests
         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 -Dcheckstyle.skip=true -Dscalastyle.skip=true -Dlicense.skipAddThirdParty=true --no-snapshot-updates