You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/10/21 03:53:15 UTC
[dubbo] branch 1021_fast created (now fed62929bf)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a change to branch 1021_fast
in repository https://gitbox.apache.org/repos/asf/dubbo.git
at fed62929bf try fast
This branch includes the following new commits:
new fed62929bf try fast
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.
[dubbo] 01/01: try fast
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 1021_fast
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit fed62929bf9b0ebd603e4fc6c05b37b6b51fb8d4
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Fri Oct 21 11:52:47 2022 +0800
try fast
---
.github/workflows/build-and-test-3.2.yml | 37 +++++++++++++++++++++++++---
unit-test.sh | 42 ++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build-and-test-3.2.yml b/.github/workflows/build-and-test-3.2.yml
index 465ecbf827..772e702f7d 100644
--- a/.github/workflows/build-and-test-3.2.yml
+++ b/.github/workflows/build-and-test-3.2.yml
@@ -77,15 +77,13 @@ jobs:
echo "dubbo version: $REVISION"
unit-test-prepare:
- name: " Preparation for Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }})"
+ name: " Preparation for Unit Test On ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, windows-2019 ]
- jdk: [ 8, 11, 17 ]
env:
- DISABLE_FILE_SYSTEM_TEST: true
ZOOKEEPER_VERSION: 3.6.3
steps:
- uses: actions/cache@v2
@@ -162,6 +160,39 @@ jobs:
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
+
+ unit-test-fast:
+ needs: [build-source, unit-test-prepare]
+ name: "Unit Test On ubuntu-20.04 (JDK: 17)"
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ case-role: [0, 1, 2, 3, 4, 5]
+ env:
+ DISABLE_FILE_SYSTEM_TEST: true
+ CURRENT_ROLE: ${{ matrix.case-role }}
+ CASE_RANGE: 6
+ steps:
+ - uses: actions/checkout@v2
+ - name: "Set up JDK ${{ matrix.jdk }}"
+ uses: actions/setup-java@v1
+ with:
+ java-version: 17
+ - uses: actions/cache@v2
+ name: "Cache local Maven repository"
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: "Test with Maven with Integration Tests"
+ timeout-minutes: 70
+ if: ${{ startsWith( matrix.os, 'ubuntu') }}
+ run: bash unit-test.sh
+ - name: "Upload coverage to Codecov"
+ uses: codecov/codecov-action@v1
+
unit-test-fastjson2:
needs: [build-source, unit-test-prepare]
name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }}, Serialization: fastjson2)"
diff --git a/unit-test.sh b/unit-test.sh
new file mode 100644
index 0000000000..d3a27f4f3a
--- /dev/null
+++ b/unit-test.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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.
+# ----------------------------------------------------------------------------
+
+data=$(find . -name pom.xml | cut -c 3- | rev | cut -c 9- | rev | sort)
+
+submodules=($data)
+CASE_RAGE=6
+CURRENT_ROLE=0
+case_count=0
+case_rage=$CASE_RAGE
+current_role=$CURRENT_ROLE
+
+for (( i = 0; i < ${#submodules[@]}; i++ )); do
+ if [ ${submodules[$i]} != "" ]; then
+ if [ $case_count -eq $current_role ]; then
+ echo "execute ${submodules[$i]} test cases"
+ ./mvnw -pl ${submodules[$i]} -o --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=$(pwd)/.tmp/zookeeper
+ if [ $? -ne 0 ]; then
+ exit $?
+ fi
+ fi
+ case_count=$((case_count + 1))
+ case_count=$((case_count % case_rage))
+ fi
+done