You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by al...@apache.org on 2021/01/29 15:06:45 UTC

[dubbo-samples] branch master updated: Improve scenario test and IT actions (#274)

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

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git


The following commit(s) were added to refs/heads/master by this push:
     new 3baaff0  Improve scenario test and IT actions  (#274)
3baaff0 is described below

commit 3baaff0168ee75227ec7355837a0685484ca29b9
Author: gongdewei <ky...@qq.com>
AuthorDate: Fri Jan 29 09:06:33 2021 -0600

    Improve scenario test and IT actions  (#274)
    
    * improve dubbo cache
    
    * improve container checking and debug
    
    * improve job name
---
 .github/workflows/dubbo-2.yml                      | 98 +++++++---------------
 .github/workflows/dubbo-3.yml                      | 98 +++++++---------------
 .github/workflows/nightly-dubbo-2.yml              | 92 ++++++--------------
 .github/workflows/nightly-dubbo-3.yml              | 92 ++++++--------------
 .../src/main/resources/scenario.sh                 | 30 +++++--
 5 files changed, 130 insertions(+), 280 deletions(-)

diff --git a/.github/workflows/dubbo-2.yml b/.github/workflows/dubbo-2.yml
index 5dc7a84..55415d9 100644
--- a/.github/workflows/dubbo-2.yml
+++ b/.github/workflows/dubbo-2.yml
@@ -36,8 +36,6 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
-      matrix:
-        java: [8, 11]
     steps:
       - uses: actions/checkout@v1
       - name: Cache local Maven repository
@@ -47,10 +45,10 @@ jobs:
           key: ${{ runner.os }}-samples-maven-${{ hashFiles('**/pom.xml') }}
           restore-keys: |
             ${{ runner.os }}-samples-maven-
-      - name: Set up JDK ${{matrix.java}}
+      - name: Set up JDK 8
         uses: actions/setup-java@v1
         with:
-          java-version: ${{matrix.java}}
+          java-version: 8
       - name: Build with Maven
         run: |
           ./mvnw $BUILD_OPTS
@@ -62,29 +60,35 @@ jobs:
     # Map a step output to a job output
     outputs:
       commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
+      version: ${{ steps.git-checker.outputs.version }}
     steps:
       - uses: actions/checkout@v2
         with:
           repository: 'apache/dubbo'
           ref: ${{env.DUBBO_REF}}
+          path: dubbo
+      - uses: actions/checkout@v2
+        with:
+          repository: 'apache/dubbo-spring-boot-project'
+          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
+          path: dubbo-spring-boot-project
       - name: Get commit id and dubbo version
         id: git-checker
         run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
           # Calculate Dubbo Version
-          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' pom.xml`
-          mkdir dubbo-version
-          echo $REVISION > dubbo-version/dubbo-version
+          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' dubbo/pom.xml`
+          echo "::set-output name=version::$REVISION"
           echo "dubbo version: $REVISION"
-      - name: Upload Dubbo version
-        uses: actions/upload-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
+          #
+          #concat dubbo/dubbo-spring-boot commit id
+          cd dubbo
+          dubbo_commit_id=`git log --format="%H" -n 1`
+          cd ../dubbo-spring-boot-project
+          dubbo_spring_boot_commit_id=`git log --format="%H" -n 1`
+          cd ..
+          commit_id=$dubbo_commit_id-$dubbo_spring_boot_commit_id
+          echo "::set-output name=commit_id::$commit_id"
+          echo "commit_id: $commit_id"
       - name: Dubbo cache
         id: dubbocache
         uses: actions/cache@v2
@@ -107,50 +111,12 @@ jobs:
       - name: Build dubbo
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
-
-  build-dubbo-spring-boot:
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-    # Map a step output to a job output
-    outputs:
-      commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          repository: 'apache/dubbo-spring-boot-project'
-          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
-      - name: Get commit id
-        id: git-checker
-        run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
-      - name: Dubbo-spring-boot cache
-        id: dubbocache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{steps.git-checker.outputs.commit_id}}
-      - name: Cache local Maven repository
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-
-      - name: Set up JDK 8
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build dubbo
+      - name: Build dubbo-spring-boot
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo-spring-boot-project
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
 
   prepare_test:
@@ -170,7 +136,8 @@ jobs:
           path: test/jobs
 
   testjob:
-    needs: [prepare_test, build-dubbo, build-dubbo-spring-boot]
+    needs: [prepare_test, build-dubbo]
+    name: 'Integration Test (Java${{matrix.java}}, Job${{matrix.job_id}})'
     runs-on: ubuntu-latest
     env:
       JAVA_VER: ${{matrix.java}}
@@ -199,24 +166,14 @@ jobs:
         with:
           path: ~/.m2/repository/org/apache/dubbo
           key: ${{ runner.os }}-dubbo-snapshot-${{needs.build-dubbo.outputs.commit_id}}
-      - name: Dubbo-spring-boot cache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{needs.build-dubbo-spring-boot.outputs.commit_id}}
       - name: Download test list
         uses: actions/download-artifact@v2
         with:
           name: test-list
           path: test/jobs/
-      - name: Download Dubbo version
-        uses: actions/download-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
       - name: Init Candidate Versions
         run: |
-          DUBBO_VERSION=`cat dubbo-version/dubbo-version`
+          DUBBO_VERSION="${{needs.build-dubbo.outputs.version}}"
           CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS"
           echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
       - name: Build test image
@@ -233,6 +190,7 @@ jobs:
 
   test_result:
     needs: [testjob]
+    name: 'Test Result (Java${{matrix.java}})'
     if: always()
     runs-on: ubuntu-latest
     strategy:
diff --git a/.github/workflows/dubbo-3.yml b/.github/workflows/dubbo-3.yml
index a746c54..64b7d1c 100644
--- a/.github/workflows/dubbo-3.yml
+++ b/.github/workflows/dubbo-3.yml
@@ -35,8 +35,6 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
-      matrix:
-        java: [8, 11]
     steps:
       - uses: actions/checkout@v1
       - name: Cache local Maven repository
@@ -46,10 +44,10 @@ jobs:
           key: ${{ runner.os }}-samples-maven-${{ hashFiles('**/pom.xml') }}
           restore-keys: |
             ${{ runner.os }}-samples-maven-
-      - name: Set up JDK ${{matrix.java}}
+      - name: Set up JDK 8
         uses: actions/setup-java@v1
         with:
-          java-version: ${{matrix.java}}
+          java-version: 8
       - name: Build with Maven
         run: |
           ./mvnw $BUILD_OPTS
@@ -61,29 +59,35 @@ jobs:
     # Map a step output to a job output
     outputs:
       commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
+      version: ${{ steps.git-checker.outputs.version }}
     steps:
       - uses: actions/checkout@v2
         with:
           repository: 'apache/dubbo'
           ref: ${{env.DUBBO_REF}}
+          path: dubbo
+      - uses: actions/checkout@v2
+        with:
+          repository: 'apache/dubbo-spring-boot-project'
+          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
+          path: dubbo-spring-boot-project
       - name: Get commit id and dubbo version
         id: git-checker
         run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
           # Calculate Dubbo Version
-          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' pom.xml`
-          mkdir dubbo-version
-          echo $REVISION > dubbo-version/dubbo-version
+          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' dubbo/pom.xml`
+          echo "::set-output name=version::$REVISION"
           echo "dubbo version: $REVISION"
-      - name: Upload Dubbo version
-        uses: actions/upload-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
+          #
+          #concat dubbo/dubbo-spring-boot commit id
+          cd dubbo
+          dubbo_commit_id=`git log --format="%H" -n 1`
+          cd ../dubbo-spring-boot-project
+          dubbo_spring_boot_commit_id=`git log --format="%H" -n 1`
+          cd ..
+          commit_id=$dubbo_commit_id-$dubbo_spring_boot_commit_id
+          echo "::set-output name=commit_id::$commit_id"
+          echo "commit_id: $commit_id"
       - name: Dubbo cache
         id: dubbocache
         uses: actions/cache@v2
@@ -106,50 +110,12 @@ jobs:
       - name: Build dubbo
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
-
-  build-dubbo-spring-boot:
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-    # Map a step output to a job output
-    outputs:
-      commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          repository: 'apache/dubbo-spring-boot-project'
-          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
-      - name: Get commit id
-        id: git-checker
-        run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
-      - name: Dubbo-spring-boot cache
-        id: dubbocache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{steps.git-checker.outputs.commit_id}}
-      - name: Cache local Maven repository
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-
-      - name: Set up JDK 8
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build dubbo
+      - name: Build dubbo-spring-boot
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo-spring-boot-project
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
 
   prepare_test:
@@ -169,7 +135,8 @@ jobs:
           path: test/jobs
 
   testjob:
-    needs: [prepare_test, build-dubbo, build-dubbo-spring-boot]
+    needs: [prepare_test, build-dubbo]
+    name: 'Integration Test (Java${{matrix.java}}, Job${{matrix.job_id}})'
     runs-on: ubuntu-latest
     env:
       JAVA_VER: ${{matrix.java}}
@@ -198,24 +165,14 @@ jobs:
         with:
           path: ~/.m2/repository/org/apache/dubbo
           key: ${{ runner.os }}-dubbo-snapshot-${{needs.build-dubbo.outputs.commit_id}}
-      - name: Dubbo-spring-boot cache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{needs.build-dubbo-spring-boot.outputs.commit_id}}
       - name: Download test list
         uses: actions/download-artifact@v2
         with:
           name: test-list
           path: test/jobs/
-      - name: Download Dubbo version
-        uses: actions/download-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
       - name: Init Candidate Versions
         run: |
-          DUBBO_VERSION=`cat dubbo-version/dubbo-version`
+          DUBBO_VERSION="${{needs.build-dubbo.outputs.version}}"
           CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS"
           echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
       - name: Build test image
@@ -232,6 +189,7 @@ jobs:
 
   test_result:
     needs: [testjob]
+    name: 'Test Result (Java${{matrix.java}})'
     if: always()
     runs-on: ubuntu-latest
     strategy:
diff --git a/.github/workflows/nightly-dubbo-2.yml b/.github/workflows/nightly-dubbo-2.yml
index f737ded..7c6a1a7 100644
--- a/.github/workflows/nightly-dubbo-2.yml
+++ b/.github/workflows/nightly-dubbo-2.yml
@@ -62,29 +62,35 @@ jobs:
     # Map a step output to a job output
     outputs:
       commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
+      version: ${{ steps.git-checker.outputs.version }}
     steps:
       - uses: actions/checkout@v2
         with:
           repository: 'apache/dubbo'
           ref: ${{env.DUBBO_REF}}
+          path: dubbo
+      - uses: actions/checkout@v2
+        with:
+          repository: 'apache/dubbo-spring-boot-project'
+          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
+          path: dubbo-spring-boot-project
       - name: Get commit id and dubbo version
         id: git-checker
         run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
           # Calculate Dubbo Version
-          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' pom.xml`
-          mkdir dubbo-version
-          echo $REVISION > dubbo-version/dubbo-version
+          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' dubbo/pom.xml`
+          echo "::set-output name=version::$REVISION"
           echo "dubbo version: $REVISION"
-      - name: Upload Dubbo version
-        uses: actions/upload-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
+          #
+          #concat dubbo/dubbo-spring-boot commit id
+          cd dubbo
+          dubbo_commit_id=`git log --format="%H" -n 1`
+          cd ../dubbo-spring-boot-project
+          dubbo_spring_boot_commit_id=`git log --format="%H" -n 1`
+          cd ..
+          commit_id=$dubbo_commit_id-$dubbo_spring_boot_commit_id
+          echo "::set-output name=commit_id::$commit_id"
+          echo "commit_id: $commit_id"
       - name: Dubbo cache
         id: dubbocache
         uses: actions/cache@v2
@@ -107,50 +113,12 @@ jobs:
       - name: Build dubbo
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
-
-  build-dubbo-spring-boot:
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-    # Map a step output to a job output
-    outputs:
-      commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          repository: 'apache/dubbo-spring-boot-project'
-          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
-      - name: Get commit id
-        id: git-checker
-        run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
-      - name: Dubbo-spring-boot cache
-        id: dubbocache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{steps.git-checker.outputs.commit_id}}
-      - name: Cache local Maven repository
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-
-      - name: Set up JDK 8
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build dubbo
+      - name: Build dubbo-spring-boot
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo-spring-boot-project
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
 
   prepare_test:
@@ -170,7 +138,8 @@ jobs:
           path: test/jobs
 
   testjob:
-    needs: [prepare_test, build-dubbo, build-dubbo-spring-boot]
+    needs: [prepare_test, build-dubbo]
+    name: 'Integration Test (Java${{matrix.java}}, Job${{matrix.job_id}})'
     runs-on: ubuntu-latest
     env:
       JAVA_VER: ${{matrix.java}}
@@ -199,24 +168,14 @@ jobs:
         with:
           path: ~/.m2/repository/org/apache/dubbo
           key: ${{ runner.os }}-dubbo-snapshot-${{needs.build-dubbo.outputs.commit_id}}
-      - name: Dubbo-spring-boot cache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{needs.build-dubbo-spring-boot.outputs.commit_id}}
       - name: Download test list
         uses: actions/download-artifact@v2
         with:
           name: test-list
           path: test/jobs/
-      - name: Download Dubbo version
-        uses: actions/download-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
       - name: Init Candidate Versions
         run: |
-          DUBBO_VERSION=`cat dubbo-version/dubbo-version`
+          DUBBO_VERSION="${{needs.build-dubbo.outputs.version}}"
           CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS"
           echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
       - name: Build test image
@@ -233,6 +192,7 @@ jobs:
 
   test_result:
     needs: [testjob]
+    name: 'Test Result (Java${{matrix.java}})'
     if: always()
     runs-on: ubuntu-latest
     strategy:
diff --git a/.github/workflows/nightly-dubbo-3.yml b/.github/workflows/nightly-dubbo-3.yml
index ecb538b..4642abe 100644
--- a/.github/workflows/nightly-dubbo-3.yml
+++ b/.github/workflows/nightly-dubbo-3.yml
@@ -61,29 +61,35 @@ jobs:
     # Map a step output to a job output
     outputs:
       commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
+      version: ${{ steps.git-checker.outputs.version }}
     steps:
       - uses: actions/checkout@v2
         with:
           repository: 'apache/dubbo'
           ref: ${{env.DUBBO_REF}}
+          path: dubbo
+      - uses: actions/checkout@v2
+        with:
+          repository: 'apache/dubbo-spring-boot-project'
+          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
+          path: dubbo-spring-boot-project
       - name: Get commit id and dubbo version
         id: git-checker
         run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
           # Calculate Dubbo Version
-          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' pom.xml`
-          mkdir dubbo-version
-          echo $REVISION > dubbo-version/dubbo-version
+          REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' dubbo/pom.xml`
+          echo "::set-output name=version::$REVISION"
           echo "dubbo version: $REVISION"
-      - name: Upload Dubbo version
-        uses: actions/upload-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
+          #
+          #concat dubbo/dubbo-spring-boot commit id
+          cd dubbo
+          dubbo_commit_id=`git log --format="%H" -n 1`
+          cd ../dubbo-spring-boot-project
+          dubbo_spring_boot_commit_id=`git log --format="%H" -n 1`
+          cd ..
+          commit_id=$dubbo_commit_id-$dubbo_spring_boot_commit_id
+          echo "::set-output name=commit_id::$commit_id"
+          echo "commit_id: $commit_id"
       - name: Dubbo cache
         id: dubbocache
         uses: actions/cache@v2
@@ -106,50 +112,12 @@ jobs:
       - name: Build dubbo
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
-
-  build-dubbo-spring-boot:
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-    # Map a step output to a job output
-    outputs:
-      commit_id: ${{ steps.git-checker.outputs.commit_id }}
-      cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          repository: 'apache/dubbo-spring-boot-project'
-          ref: ${{env.DUBBO_SPRING_BOOT_REF}}
-      - name: Get commit id
-        id: git-checker
-        run: |
-          #compare dubbo commit id
-          last_commit_id=`git log --format="%H" -n 1`
-          echo "::set-output name=commit_id::$last_commit_id"
-          echo "commit_id: $last_commit_id"
-      - name: Dubbo-spring-boot cache
-        id: dubbocache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{steps.git-checker.outputs.commit_id}}
-      - name: Cache local Maven repository
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-
-      - name: Set up JDK 8
-        if: steps.dubbocache.outputs.cache-hit != 'true'
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build dubbo
+      - name: Build dubbo-spring-boot
         if: steps.dubbocache.outputs.cache-hit != 'true'
         run: |
+          cd dubbo-spring-boot-project
           ./mvnw --batch-mode --no-transfer-progress  clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
 
   prepare_test:
@@ -169,7 +137,8 @@ jobs:
           path: test/jobs
 
   testjob:
-    needs: [prepare_test, build-dubbo, build-dubbo-spring-boot]
+    needs: [prepare_test, build-dubbo]
+    name: 'Integration Test (Java${{matrix.java}}, Job${{matrix.job_id}})'
     runs-on: ubuntu-latest
     env:
       JAVA_VER: ${{matrix.java}}
@@ -198,24 +167,14 @@ jobs:
         with:
           path: ~/.m2/repository/org/apache/dubbo
           key: ${{ runner.os }}-dubbo-snapshot-${{needs.build-dubbo.outputs.commit_id}}
-      - name: Dubbo-spring-boot cache
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository/org/apache/dubbo
-          key: ${{ runner.os }}-dubbo-spring-boot-snapshot-${{needs.build-dubbo-spring-boot.outputs.commit_id}}
       - name: Download test list
         uses: actions/download-artifact@v2
         with:
           name: test-list
           path: test/jobs/
-      - name: Download Dubbo version
-        uses: actions/download-artifact@v2
-        with:
-          name: dubbo-version
-          path: dubbo-version
       - name: Init Candidate Versions
         run: |
-          DUBBO_VERSION=`cat dubbo-version/dubbo-version`
+          DUBBO_VERSION="${{needs.build-dubbo.outputs.version}}"
           CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS"
           echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
       - name: Build test image
@@ -232,6 +191,7 @@ jobs:
 
   test_result:
     needs: [testjob]
+    name: 'Test Result (Java${{matrix.java}})'
     if: always()
     runs-on: ubuntu-latest
     strategy:
diff --git a/test/dubbo-scenario-builder/src/main/resources/scenario.sh b/test/dubbo-scenario-builder/src/main/resources/scenario.sh
index c3d34a4..1b89848 100644
--- a/test/dubbo-scenario-builder/src/main/resources/scenario.sh
+++ b/test/dubbo-scenario-builder/src/main/resources/scenario.sh
@@ -81,7 +81,7 @@ function redirect_container_logs() {
     return 0
   fi
 
-  container_id=`docker ps -qf "name=${container_name}"`
+  container_id=`docker ps -aqf "name=${container_name}"`
   if [[ -z "${container_id}" ]]; then
     return 1
   fi
@@ -106,6 +106,17 @@ function wait_container_exit() {
   while [ 1 = 1 ];
   do
     sleep 2
+    duration=$(( SECONDS - start ))
+    if [ $duration -gt $timeout ];then
+      echo "wait for container is timeout: $duration s"
+      return 1
+    fi
+
+    container_id=`docker ps -aqf "name=${container_name}"`
+    if [[ -z "${container_id}" ]]; then
+      continue
+    fi
+
     status=`docker inspect $container_name --format='{{.State.Status}}'`
     # test container may pending start cause by depends_on condition
 #    result=$?
@@ -117,11 +128,6 @@ function wait_container_exit() {
         return 0
     fi
 
-    duration=$(( SECONDS - start ))
-    if [ $duration -gt $timeout ];then
-      echo "wait for container is timeout: $duration s"
-      return 1
-    fi
   done
 }
 
@@ -155,7 +161,7 @@ docker-compose -p ${project_name} -f ${compose_file} up -d 2>&1 <<< "NNN" | tee
 sleep 5
 
 # test container may pending start cause by depends_on condition
-#container_id=`docker ps -qf "name=${container_name}"`
+#container_id=`docker ps -aqf "name=${container_name}"`
 #if [[ -z "${container_id}" ]]; then
 #    echo "[$scenario_name] docker startup failure!" | tee -a $scenario_log
 #    status=1
@@ -178,9 +184,15 @@ sleep 5
         echo "[$scenario_name] $ERROR_MSG_FLAG Run tests timeout" | tee -a $scenario_log
     fi
 
+    if [[ "$debug_mode" == "1" ]]; then
+      echo "[$scenario_name] Waiting for debugging .." | tee -a $scenario_log
+      echo "[$scenario_name] Please type 'Ctrl + C' or run the script './kill-tests.sh' to end debugging .." | tee -a $scenario_log
+      # idle waiting for abort from user
+      read -r -d '' _ </dev/tty
+    fi
+
     echo "[$scenario_name] Stopping containers .." | tee -a $scenario_log
     docker-compose -p ${project_name} -f ${compose_file} kill 2>&1 | tee -a $scenario_log > /dev/null
-    docker wait ${container_name} > /dev/null
 #fi
 
 if [[ $status == 0 ]];then
@@ -189,6 +201,8 @@ if [[ $status == 0 ]];then
 else
     for service_name in ${service_names[@]};do
         service_container_name=${project_name}_${service_name}_1
+        docker wait $service_container_name > /dev/null
+
         echo "docker inspect $service_container_name  :" >> $scenario_log
         docker inspect $service_container_name >> $scenario_log
         echo "" >> $scenario_log


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org