Improve scenario test and IT actions (#274)
* improve dubbo cache
* improve container checking and debug
* improve job name
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 @@
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 @@
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 @@
# 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 @@
- 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
# 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 @@
- 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 @@
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 @@
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 @@
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 @@
# 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 @@
- 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 @@
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 @@
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 @@
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 @@
# 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 @@
- 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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