You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/26 14:28:33 UTC

[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #3194: [Improve][CI] Improve ci and remove build task and only api or engine changed need run license check

EricJoy2048 commented on code in PR #3194:
URL: https://github.com/apache/incubator-seatunnel/pull/3194#discussion_r1005759351


##########
.github/workflows/backend.yml:
##########
@@ -79,40 +79,142 @@ jobs:
           [[ ${{ needs.code-style.result }} == 'success' ]] || exit 1;
           [[ ${{ needs.dead-link.result }} == 'success' ]] || exit 1;
 
-  build:
+  changes:
+    runs-on: ubuntu-latest
+    # To prevent error when there's no base branch
     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: 80
+    timeout-minutes: 10
+    outputs:
+      api: ${{ steps.filter.outputs.api }}
+      engine: ${{ steps.filter.outputs.engine }}
+      ut-modules: ${{ steps.ut-modules.outputs.modules }}
+      it-modules: ${{ steps.it-modules.outputs.modules }}
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v3 # required for push event
+      - uses: actions/setup-python@v4
         with:
-          submodules: true
-      - uses: actions/setup-java@v3
+          python-version: '2.7'
+      - name: Check for file changes
+        uses: dorny/paths-filter@v2
+        id: filter
         with:
-          distribution: 'temurin'
-          java-version: ${{ matrix.java }}
-          cache: 'maven'
-      - name: Build distribution tar
-        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
+          token: ${{ github.token }}
+          list-files: json
+          # The following is a single composite pattern that allows next CI steps,
+          # the pattern is in form of [not (foo or bar)] to be safe.
+          # When new files come in, the CI will NOT ignore them unless listed,
+          # so remember to extend here if they do not serve functional purposes.
+          # NOTE: careful with using ** in expression, keep !**/{old, new things}.
+          filters: |
+            cv2:
+              - "seatunnel-connectors-v2/**"
+            cv2-flink-e2e:
+              - "seatunnel-e2e/seatunnel-flink-connector-v2-e2e/**"
+            cv2-spark-e2e:
+              - "seatunnel-e2e/seatunnel-spark-connector-v2-e2e/**"
+            cv2-e2e:
+              - "seatunnel-e2e/seatunnel-connector-v2-e2e/**"
+            api:
+              - "seatunnel-api"
+              - "seatunnel-apis"
+              - "seatunnel-common"
+              - "seatunnel-config"
+              - "seatunnel-connectors"
+              - "seatunnel-core"
+              - "seatunnel-dist"
+              - "seatunnel-e2e/seatunnel-e2e-common"
+              - "seatunnel-formats"
+              - "seatunnel-plugin-discovery"
+              - "seatunnel-transforms"

Review Comment:
   > We just need to determine if he is in the `e2e` or `connectors` or other module range, and only execute if he is not. Is this possible to do? Otherwise we would still need to maintain the script, and I would prefer that this be a stable change.
   
   No, it's difficult. Because without `api` judge we can not know whether `api` modules be updated when `connector` and `e2e` modules been updated too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org