Skip to content
Permalink
Browse files
Add case versions (#262)
  • Loading branch information
kylixs committed Jan 15, 2021
1 parent d706c1f commit f523abc3a1f9529bf1f9577abf6fa5568d318c4f
Showing 16 changed files with 121 additions and 28 deletions.
@@ -16,7 +16,7 @@ env:
#multi-version size limit
VERSIONS_LIMIT: 4
CANDIDATE_VERSIONS: '
dubbo.version:2.7.8,2.7.9-SNAPSHOT;
dubbo.version:2.7.9-SNAPSHOT;
spring.version:4.3.30.RELEASE;
spring-boot.version:1.5.22.RELEASE;
spring-boot.version:2.4.1;
@@ -105,8 +105,7 @@ jobs:
- uses: actions/checkout@v1
- name: Prepare test list
run: |
cd test
bash ./prepare-test.sh
bash ./test/scripts/prepare-test.sh
- name: Upload test list
uses: actions/upload-artifact@v2
with:
@@ -132,7 +131,7 @@ jobs:
name: test-result
path: test/jobs/
- name: Merge test result - java ${{matrix.java}}
run: ./test/merge-test-results.sh
run: ./test/scripts/merge-test-results.sh

testjob_1:
needs: [prepare_test, build-dubbo]
@@ -105,8 +105,7 @@ jobs:
- uses: actions/checkout@v1
- name: Prepare test list
run: |
cd test
bash ./prepare-test.sh
bash ./test/scripts/prepare-test.sh
- name: Upload test list
uses: actions/upload-artifact@v2
with:
@@ -132,7 +131,7 @@ jobs:
name: test-result
path: test/jobs/
- name: Merge test result - java ${{matrix.java}}
run: ./test/merge-test-results.sh
run: ./test/scripts/merge-test-results.sh

testjob_1:
needs: [prepare_test, build-dubbo]
@@ -21,9 +21,9 @@ env:
VERSIONS_LIMIT: 12
CANDIDATE_VERSIONS: '
dubbo.version: 2.7.8, 2.7.9-SNAPSHOT;
spring.version: 4.1.9.RELEASE, 4.2.9.RELEASE, 5.1.20.RELEASE, 5.3.3;
spring-boot.version: 1.1.12.RELEASE, 1.2.8.RELEASE, 1.3.8.RELEASE, 1.4.7.RELEASE;
spring-boot.version: 2.0.9.RELEASE, 2.1.18.RELEASE, 2.2.12.RELEASE, 2.3.7.RELEASE
spring.version: 4.2.9.RELEASE, 4.3.30.RELEASE, 5.1.20.RELEASE, 5.3.3;
spring-boot.version: 1.1.12.RELEASE, 1.2.8.RELEASE, 1.3.8.RELEASE, 1.4.7.RELEASE, 1.5.22.RELEASE;
spring-boot.version: 2.0.9.RELEASE, 2.1.18.RELEASE, 2.2.12.RELEASE, 2.3.7.RELEASE, 2.4.1
'

jobs:
@@ -109,8 +109,7 @@ jobs:
- uses: actions/checkout@v1
- name: Prepare test list
run: |
cd test
bash ./prepare-test.sh
bash ./test/scripts/prepare-test.sh
- name: Upload test list
uses: actions/upload-artifact@v2
with:
@@ -136,7 +135,7 @@ jobs:
name: test-result
path: test/jobs/
- name: Merge test result - java ${{matrix.java}}
run: ./test/merge-test-results.sh
run: ./test/scripts/merge-test-results.sh

testjob_1:
needs: [prepare_test, build-dubbo]
@@ -21,9 +21,9 @@ env:
VERSIONS_LIMIT: 12
CANDIDATE_VERSIONS: '
dubbo.version: 3.0.0-SNAPSHOT;
spring.version: 4.1.9.RELEASE, 4.2.9.RELEASE, 5.1.20.RELEASE, 5.3.3;
spring-boot.version: 1.1.12.RELEASE, 1.2.8.RELEASE, 1.3.8.RELEASE, 1.4.7.RELEASE;
spring-boot.version: 2.0.9.RELEASE, 2.1.18.RELEASE, 2.2.12.RELEASE, 2.3.7.RELEASE;
spring.version: 4.2.9.RELEASE, 4.3.30.RELEASE, 5.1.20.RELEASE, 5.3.3;
spring-boot.version: 1.1.12.RELEASE, 1.2.8.RELEASE, 1.3.8.RELEASE, 1.4.7.RELEASE, 1.5.22.RELEASE;
spring-boot.version: 2.0.9.RELEASE, 2.1.18.RELEASE, 2.2.12.RELEASE, 2.3.7.RELEASE, 2.4.1
'

jobs:
@@ -109,8 +109,7 @@ jobs:
- uses: actions/checkout@v1
- name: Prepare test list
run: |
cd test
bash ./prepare-test.sh
bash ./test/scripts/prepare-test.sh
- name: Upload test list
uses: actions/upload-artifact@v2
with:
@@ -136,7 +135,7 @@ jobs:
name: test-result
path: test/jobs/
- name: Merge test result - java ${{matrix.java}}
run: ./test/merge-test-results.sh
run: ./test/scripts/merge-test-results.sh

testjob_1:
needs: [prepare_test, build-dubbo]
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# Spring app
dubbo.version=2.7*, 3.*
spring.version=4.*, 5.*
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# Spring app
dubbo.version=2.7*, 3.*
spring.version=4.*, 5.*
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# Spring app
dubbo.version=2.7*, 3.*
spring.version=4.*, 5.*
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# SpringBoot app
dubbo.version=2.7*, 3.*
spring-boot.version=2.*
@@ -1,6 +1,6 @@
#!/bin/bash

# Usages:
# Use mirror:
# DEBIAN_MIRROR=http://mirrors.aliyun.com ./build-test-image.sh

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -0,0 +1,50 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

all_projects=`find $DIR/../.. -name pom.xml`
project_count=`echo $all_projects | tr ' ' '\n' | grep -c ""`
echo "Total projects: $project_count"

case_config_template1=$DIR/case-versions.conf.1
case_config_template2=$DIR/case-versions.conf.2
case_config_template3=$DIR/case-versions.conf.3

while read project
do
# echo "project: $project"
project_dir=`dirname $project`
if [ ! -f $project_dir/case-configuration.yml ]; then
continue
fi

grep "<spring.version>" $project_dir/pom.xml > /dev/null
result=$?
if [ $result -eq 0 ]; then
case_config_template=$case_config_template1
fi

grep "<spring-boot.version>1" $project_dir/pom.xml > /dev/null
result=$?
if [ $result -eq 0 ]; then
case_config_template=$case_config_template2
fi

grep "<spring-boot.version>2" $project_dir/pom.xml > /dev/null
result=$?
if [ $result -eq 0 ]; then
case_config_template=$case_config_template3
fi

if [ -z $case_config_template ]; then
echo "not match: $project_dir"
continue
fi

if [ -f $project_dir/case-versions.conf ];then
continue
fi

echo "copy $case_config_template to $project_dir"
cp -n $case_config_template $project_dir/case-versions.conf
done <<< "$all_projects"
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# Spring app
dubbo.version=2.7*, 3.*
spring.version=4.*, 5.*
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# SpringBoot app
dubbo.version=2.7*, 3.*
spring-boot.version=1.*
@@ -0,0 +1,6 @@

# Supported component versions of the test case

# SpringBoot app
dubbo.version=2.7*, 3.*
spring-boot.version=2.*
File renamed without changes.
@@ -1,7 +1,9 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

test_dir=$DIR/..
cd $test_dir

TEST_SUCCESS="TEST SUCCESS"
TEST_FAILURE="TEST FAILURE"
@@ -29,7 +31,7 @@ echo "----------------------------------------------------------"
echo "All tests count: $totalCount"
echo "Success tests count: $successTest"

if [ $successTest == $totalCount ]; then
if [ "$successTest" == "$totalCount" ]; then
if [ $successTest -gt 0 ]; then
echo "All tests pass"
echo "----------------------------------------------------------"
@@ -2,20 +2,23 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

test_dir=$DIR/..

JOB_COUNT=${JOB_COUNT:-5}
echo "JOB_COUNT: $JOB_COUNT"

jobs_dir=$test_dir/jobs
mkdir -p $jobs_dir
rm -f $jobs_dir/*

# find all case-configuration.yml
CONFIG_FILE="case-configuration.yml"
test_list_file=$DIR/testcases.txt
test_base_dir="$( cd $DIR/.. && pwd )"
test_list_file=$jobs_dir/testcases.txt
test_base_dir="$( cd $test_dir/.. && pwd )"
echo "Searching all '$CONFIG_FILE' under dir $test_base_dir .."
find $test_base_dir -name $CONFIG_FILE | grep -v "$DIR" > $test_list_file
find $test_base_dir -name $CONFIG_FILE | grep -v "$test_dir" > $test_list_file

# Split test list into JOB_COUNT parts
jobs_dir=$DIR/jobs
mkdir -p $jobs_dir
rm -f $jobs_dir/*
case_index=0
while read file
do

0 comments on commit f523abc

Please sign in to comment.