Skip to content
Permalink
Browse files
Improve test versions and samples (#270)
* add case configuration

* add test for sc-call-dubbo

* disable service discovery test

* fix cloud-native-xml pom (#3)

* fix version params matrix

* enable case configuration

* ignore tests which version mismatch

* If none of the tests pass, the test is considered failed

* improve test summary

* build dubbo-spring-boot-project

* improve doc

* fix spring and grpc version

* fix mixed version error of spring-boot

* fix spring-boot version

* improve zipkin sample

* switch to apache/dubbo-spring-boot-project

* fix url protocol

* print test version in error msg

* fix spring version

* add CompatibleServiceDiscovery

* fix candidate versions

* improve test scripts

* support to set ignore reason of case

* improve maven build speed, remove update snapshot arg -U

* ignore case: dubbo-call-sc

* improve test error msg

* improve greeting timeout

* Add ASF license

* Ignore sc-dubbo samples

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
  • Loading branch information
kylixs and AlbumenJ committed Jan 26, 2021
1 parent d070f7b commit 96efbf47246120e664767645ec6e5493981d1970
Showing 172 changed files with 3,397 additions and 759 deletions.
@@ -17,17 +17,19 @@ env:
FORK_COUNT: 2
FAIL_FAST: 0
SHOW_ERROR_DETAIL: 1
BUILD_OPTS: -U --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
BUILD_OPTS: --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
-Dmaven.wagon.http.retryHandler.count=3 clean package dependency:copy-dependencies -DskipTests
#multi-version size limit
VERSIONS_LIMIT: 4
#candidate versions (the dubbo snapshot version will be extracted from pom.xml and appended before CANDIDATE_VERSIONS )
CANDIDATE_VERSIONS: '
dubbo.version:2.7.8;
spring.version:4.3.30.RELEASE;
spring-boot.version:1.5.22.RELEASE;
spring-boot.version:2.4.1;
'
DUBBO_REF: master
DUBBO_REF: 'master'
DUBBO_SPRING_BOOT_REF: '2.7.x'

jobs:
build-samples:
@@ -105,7 +107,51 @@ jobs:
- name: Build dubbo
if: steps.dubbocache.outputs.cache-hit != 'true'
run: |
./mvnw -U --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
./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
if: steps.dubbocache.outputs.cache-hit != 'true'
run: |
./mvnw --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
prepare_test:
runs-on: ubuntu-latest
@@ -124,7 +170,7 @@ jobs:
path: test/jobs

testjob:
needs: [prepare_test, build-dubbo]
needs: [prepare_test, build-dubbo, build-dubbo-spring-boot]
runs-on: ubuntu-latest
env:
JAVA_VER: ${{matrix.java}}
@@ -153,6 +199,11 @@ 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:
@@ -17,7 +17,7 @@ env:
FORK_COUNT: 2
FAIL_FAST: 0
SHOW_ERROR_DETAIL: 1
BUILD_OPTS: -U --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
BUILD_OPTS: --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
-Dmaven.wagon.http.retryHandler.count=3 clean package dependency:copy-dependencies -DskipTests
#multi-version size limit
VERSIONS_LIMIT: 4
@@ -28,6 +28,7 @@ env:
spring-boot.version:2.4.1;
'
DUBBO_REF: '3.0'
DUBBO_SPRING_BOOT_REF: '3.0.x'

jobs:
build-samples:
@@ -105,7 +106,51 @@ jobs:
- name: Build dubbo
if: steps.dubbocache.outputs.cache-hit != 'true'
run: |
./mvnw -U --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
./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
if: steps.dubbocache.outputs.cache-hit != 'true'
run: |
./mvnw --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
prepare_test:
runs-on: ubuntu-latest
@@ -124,7 +169,7 @@ jobs:
path: test/jobs

testjob:
needs: [prepare_test, build-dubbo]
needs: [prepare_test, build-dubbo, build-dubbo-spring-boot]
runs-on: ubuntu-latest
env:
JAVA_VER: ${{matrix.java}}
@@ -153,6 +198,11 @@ 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:
@@ -17,7 +17,7 @@ env:
FORK_COUNT: 1
FAIL_FAST: 0
SHOW_ERROR_DETAIL: 1
BUILD_OPTS: -U --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
BUILD_OPTS: --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
-Dmaven.wagon.http.retryHandler.count=3 clean package dependency:copy-dependencies -DskipTests
#multi-version size limit
VERSIONS_LIMIT: 12
@@ -106,7 +106,7 @@ jobs:
- name: Build dubbo
if: steps.dubbocache.outputs.cache-hit != 'true'
run: |
./mvnw -U --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
./mvnw --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
prepare_test:
runs-on: ubuntu-latest
@@ -17,7 +17,7 @@ env:
FORK_COUNT: 1
FAIL_FAST: 0
SHOW_ERROR_DETAIL: 1
BUILD_OPTS: -U --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
BUILD_OPTS: --batch-mode --no-transfer-progress --settings ${{github.workspace}}/.mvn/settings.xml
-Dmaven.wagon.http.retryHandler.count=3 clean package dependency:copy-dependencies -DskipTests
#multi-version size limit
VERSIONS_LIMIT: 12
@@ -105,7 +105,7 @@ jobs:
- name: Build dubbo
if: steps.dubbocache.outputs.cache-hit != 'true'
run: |
./mvnw -U --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
./mvnw --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
prepare_test:
runs-on: ubuntu-latest
@@ -1,3 +1,20 @@
#
#
# 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.
#

# Supported component versions of the test case

@@ -1,3 +1,21 @@
#
#
# 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.
#


# Supported component versions of the test case

@@ -1,3 +1,21 @@
#