This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 3dd90650f4 Fix codecov no result (#14970)
3dd90650f4 is described below
commit 3dd90650f4fa16418fd2db6a589081b8593409a2
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Dec 6 20:46:53 2024 +0800
Fix codecov no result (#14970)
---
.github/workflows/build-and-test-pr.yml | 92 ++++++++++++++--------
codecov.yml | 3 +
.../apache/dubbo/config/ReferenceConfigTest.java | 2 +
.../dubbo-spring-boot-compatible/pom.xml | 14 ++--
dubbo-test/dubbo-test-spring3.2/pom.xml | 14 ++--
dubbo-test/dubbo-test-spring4.1/pom.xml | 14 ++--
dubbo-test/dubbo-test-spring4.2/pom.xml | 14 ++--
pom.xml | 41 ++--------
8 files changed, 109 insertions(+), 85 deletions(-)
diff --git a/.github/workflows/build-and-test-pr.yml
b/.github/workflows/build-and-test-pr.yml
index 5455362ebe..fd2560825a 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -108,8 +108,6 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- with:
- path: dubbo
- name: "Set up JDK"
uses: actions/setup-java@v4
with:
@@ -135,7 +133,6 @@ jobs:
run: rm -rf ~/.m2/repository/org/apache/dubbo
- name: "Build Dubbo with maven"
run: |
- cd ./dubbo
./mvnw ${{ env.MAVEN_ARGS }} clean install
-Psources,'!demo',skip-spotless,checkstyle -Dmaven.test.skip=true
-DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
- name: "Save dubbo cache"
uses: actions/cache/save@v4
@@ -171,7 +168,7 @@ jobs:
- name: "Calculate Dubbo Version"
id: dubbo-version
run: |
- REVISION=`awk
'/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print
$1;exit;}' ./dubbo/pom.xml`
+ REVISION=`awk
'/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print
$1;exit;}' ./pom.xml`
echo "version=$REVISION" >> $GITHUB_OUTPUT
echo "dubbo version: $REVISION"
@@ -210,7 +207,7 @@ jobs:
ls -al ${{ github.workspace
}}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz
unit-test:
- needs: [check-format, build-source, unit-test-prepare]
+ needs: [check-format, unit-test-prepare]
name: "Unit Test On ubuntu-latest"
runs-on: ubuntu-latest
strategy:
@@ -251,15 +248,23 @@ jobs:
timeout-minutes: 90
run: |
set -o pipefail
- ./mvnw ${{ env.MAVEN_ARGS }} clean test verify
-Pjacoco,jdk15ge-simple,'!jdk15ge','!demo',skip-spotless,jacoco089
-DtrimStackTrace=false -Dmaven.test.skip=false -Dcheckstyle.skip=false
-Dcheckstyle_unix.skip=false -Drat.skip=false -DembeddedZookeeperPath=${{
github.workspace }}/.tmp/zookeeper 2>&1 | tee >(grep -n -B 1 -A 200 "FAILURE!
-- in" > test_errors.log)
+ ./mvnw ${{ env.MAVEN_ARGS }} clean test verify
-Pjacoco,jdk15ge-simple,'!jdk15ge','!demo',skip-spotless -DtrimStackTrace=false
-Dmaven.test.skip=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false
-Drat.skip=false -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
2>&1 | tee >(grep -n -B 1 -A 200 "FAILURE! -- in" > test_errors.log)
- name: "Print test error log"
if: failure()
run: cat test_errors.log
- - name: "Upload coverage result"
+ - name: "Upload coverage to Codecov"
+ uses: codecov/codecov-action@v5
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ verbose: true
+ flags: unit-tests
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ - name: "Upload surefire reports"
uses: actions/upload-artifact@v4
with:
- name: coverage-result
- path: "**/target/site/**/jacoco.xml"
+ name: surefire-reports
+ path: "**/target/surefire-reports/**"
samples-test-prepare:
needs: check-format
@@ -467,21 +472,15 @@ jobs:
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
- jacoco-result-merge:
+ samples-jacoco-result-merge:
runs-on: ubuntu-latest
- needs: [check-format, integration-test-result, samples-test-result,
unit-test]
+ needs: [check-format, samples-test-result]
steps:
- uses: actions/checkout@v4
- with:
- path: "./dubbo"
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
path: "./dubbo-samples"
- - uses: actions/checkout@v4
- with:
- repository: 'apache/dubbo-integration-cases'
- path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
uses: actions/setup-java@v4
with:
@@ -495,7 +494,6 @@ jobs:
path: ${{ github.workspace }}
- name: "Unpack class result"
run: |
- cd ${{ github.workspace }}/dubbo
unzip -o ${{ github.workspace }}/class.zip
- name: "Restore samples jacoco exec"
uses: actions/download-artifact@v4
@@ -503,31 +501,63 @@ jobs:
pattern: samples-jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-samples/target/
+ - name: "Merge samples jacoco result"
+ run: |
+ cd ${{ github.workspace
}}/dubbo-samples/test/dubbo-test-jacoco-merger
+ mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoReport"
-Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}"
+ - name: "Remove old test result"
+ run: |
+ rm -rf ${{ github.workspace }}/dubbo-samples
+ - name: "Upload coverage to Codecov"
+ uses: codecov/codecov-action@v4
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ flags: samples-tests
+ verbose: true
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+
+ integration-jacoco-result-merge:
+ runs-on: ubuntu-latest
+ needs: [check-format, integration-test-result, samples-test-result]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/checkout@v4
+ with:
+ repository: 'apache/dubbo-integration-cases'
+ path: "./dubbo-integration-cases"
+ - name: "Set up JDK 21"
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'zulu'
+ java-version: 21
+ - name: "Restore class result"
+ uses: actions/download-artifact@v4
+ with:
+ name: "class-file"
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ path: ${{ github.workspace }}
+ - name: "Unpack class result"
+ run: |
+ unzip -o ${{ github.workspace }}/class.zip
- name: "Restore integration test jacoco exec"
uses: actions/download-artifact@v4
with:
pattern: jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-integration-cases/target/
- - name: "Merge samples jacoco result"
- run: |
- cd ${{ github.workspace
}}/dubbo-samples/test/dubbo-test-jacoco-merger
- mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoReport"
-Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}/dubbo"
- name: "Merge integration test jacoco result"
run: |
cd ${{ github.workspace
}}/dubbo-integration-cases/test/dubbo-test-jacoco-merger
- mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoReport"
-Dexec.args="${{github.workspace}}/dubbo-integration-cases
${{github.workspace}}/dubbo"
- - name: "Restore coverage result"
- uses: actions/download-artifact@v4
- with:
- name: coverage-result
- github-token: ${{ secrets.GITHUB_TOKEN }}
- path: dubbo/
+ mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoReport"
-Dexec.args="${{github.workspace}}/dubbo-integration-cases
${{github.workspace}}"
+ - name: "Remove old test result"
+ run: |
+ rm -rf ${{ github.workspace }}/dubbo-integration-cases
- name: "Upload coverage to Codecov"
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- version: v0.6.0
+ flags: integration-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/codecov.yml b/codecov.yml
index 594d03079b..42cd07d337 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -17,6 +17,9 @@ codecov:
require_ci_to_pass: false
notify:
wait_for_ci: false
+fixes:
+ - "/home/runner/work/dubbo/dubbo/::"
+ - "/home/runner/work/dubbo/dubbo/dubbo/::"
coverage:
status:
# pull-requests only
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
index 6b17d2a45d..1077a61b73 100644
---
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
@@ -137,6 +137,7 @@ class ReferenceConfigTest {
@BeforeEach
public void setUp() throws Exception {
DubboBootstrap.reset();
+ FrameworkModel.destroyAll();
ApplicationModel.defaultModel().getApplicationConfigManager();
DubboBootstrap.getInstance();
}
@@ -144,6 +145,7 @@ class ReferenceConfigTest {
@AfterEach
public void tearDown() throws IOException {
DubboBootstrap.reset();
+ FrameworkModel.destroyAll();
Mockito.framework().clearInlineMocks();
}
diff --git a/dubbo-spring-boot-project/dubbo-spring-boot-compatible/pom.xml
b/dubbo-spring-boot-project/dubbo-spring-boot-compatible/pom.xml
index d82f7da43d..2df055e915 100644
--- a/dubbo-spring-boot-project/dubbo-spring-boot-compatible/pom.xml
+++ b/dubbo-spring-boot-project/dubbo-spring-boot-compatible/pom.xml
@@ -95,10 +95,18 @@
</properties>
</profile>
<profile>
- <id>jdk15ge-simple</id>
+ <id>jdk15ge-add-open</id>
<activation>
<jdk>[15,</jdk>
</activation>
+ <properties>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.math=ALL-UNNAMED
+ --add-opens java.base/java.util=ALL-UNNAMED</argLine>
+ </properties>
+ </profile>
+ <profile>
+ <id>jdk15ge-simple</id>
<build>
<plugins>
<plugin>
@@ -107,10 +115,6 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}
- --add-opens java.base/java.lang=ALL-UNNAMED
- --add-opens java.base/java.math=ALL-UNNAMED
- --add-opens
java.base/java.util=ALL-UNNAMED</argLine>
<systemProperties>
<!-- common shared -->
</systemProperties>
diff --git a/dubbo-test/dubbo-test-spring3.2/pom.xml
b/dubbo-test/dubbo-test-spring3.2/pom.xml
index 6ed794c784..dd1f545855 100644
--- a/dubbo-test/dubbo-test-spring3.2/pom.xml
+++ b/dubbo-test/dubbo-test-spring3.2/pom.xml
@@ -85,10 +85,18 @@
<profiles>
<profile>
- <id>jdk15ge-simple</id>
+ <id>jdk15ge-add-open</id>
<activation>
<jdk>[15,</jdk>
</activation>
+ <properties>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.math=ALL-UNNAMED
+ --add-opens java.base/java.util=ALL-UNNAMED</argLine>
+ </properties>
+ </profile>
+ <profile>
+ <id>jdk15ge-simple</id>
<build>
<plugins>
<plugin>
@@ -97,10 +105,6 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}
- --add-opens java.base/java.lang=ALL-UNNAMED
- --add-opens java.base/java.math=ALL-UNNAMED
- --add-opens
java.base/java.util=ALL-UNNAMED</argLine>
<systemProperties>
<!-- common shared -->
</systemProperties>
diff --git a/dubbo-test/dubbo-test-spring4.1/pom.xml
b/dubbo-test/dubbo-test-spring4.1/pom.xml
index 499fbd9934..819de7442f 100644
--- a/dubbo-test/dubbo-test-spring4.1/pom.xml
+++ b/dubbo-test/dubbo-test-spring4.1/pom.xml
@@ -85,10 +85,18 @@
<profiles>
<profile>
- <id>jdk15ge-simple</id>
+ <id>jdk15ge-add-open</id>
<activation>
<jdk>[15,</jdk>
</activation>
+ <properties>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.math=ALL-UNNAMED
+ --add-opens java.base/java.util=ALL-UNNAMED</argLine>
+ </properties>
+ </profile>
+ <profile>
+ <id>jdk15ge-simple</id>
<build>
<plugins>
<plugin>
@@ -97,10 +105,6 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}
- --add-opens java.base/java.lang=ALL-UNNAMED
- --add-opens java.base/java.math=ALL-UNNAMED
- --add-opens
java.base/java.util=ALL-UNNAMED</argLine>
<systemProperties>
<!-- common shared -->
</systemProperties>
diff --git a/dubbo-test/dubbo-test-spring4.2/pom.xml
b/dubbo-test/dubbo-test-spring4.2/pom.xml
index b3e19f14c1..9010804e97 100644
--- a/dubbo-test/dubbo-test-spring4.2/pom.xml
+++ b/dubbo-test/dubbo-test-spring4.2/pom.xml
@@ -85,10 +85,18 @@
<profiles>
<profile>
- <id>jdk15ge-simple</id>
+ <id>jdk15ge-add-open</id>
<activation>
<jdk>[15,</jdk>
</activation>
+ <properties>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.math=ALL-UNNAMED
+ --add-opens java.base/java.util=ALL-UNNAMED</argLine>
+ </properties>
+ </profile>
+ <profile>
+ <id>jdk15ge-simple</id>
<build>
<plugins>
<plugin>
@@ -97,10 +105,6 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}
- --add-opens java.base/java.lang=ALL-UNNAMED
- --add-opens java.base/java.math=ALL-UNNAMED
- --add-opens
java.base/java.util=ALL-UNNAMED</argLine>
<systemProperties>
<!-- common shared -->
</systemProperties>
diff --git a/pom.xml b/pom.xml
index a5e11681b5..3085b34366 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,6 @@
<argline>-server -Xms256m -Xmx512m -XX:MetaspaceSize=64m
-XX:MaxMetaspaceSize=128m -Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true</argline>
<arguments />
- <jacocoArgLine />
<profile.name>oss</profile.name>
<updateReleaseInfo>true</updateReleaseInfo>
<skip_maven_deploy>false</skip_maven_deploy>
@@ -346,9 +345,6 @@
<goals>
<goal>prepare-agent</goal>
</goals>
- <configuration>
- <propertyName>jacocoArgLine</propertyName>
- </configuration>
</execution>
<execution>
<id>report-aggregate</id>
@@ -373,10 +369,11 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}</argLine>
<systemProperties>
<!-- common shared -->
</systemProperties>
+ <!-- Activate the use of TCP to transmit events to the plugin to fix
Corrupted STDOUT issue -->
+ <forkNode
implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"
/>
</configuration>
</plugin>
<plugin>
@@ -794,27 +791,11 @@
<activation>
<jdk>[15,</jdk>
</activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <useSystemClassLoader>true</useSystemClassLoader>
- <forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}
- --add-opens java.base/java.lang=ALL-UNNAMED
- --add-opens java.base/java.math=ALL-UNNAMED
- --add-opens
java.base/java.util=ALL-UNNAMED</argLine>
- <systemProperties>
- <!-- common shared -->
- </systemProperties>
- <!-- Activate the use of TCP to transmit events to the plugin to
fix Corrupted STDOUT issue -->
- <forkNode
implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"
/>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <properties>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.math=ALL-UNNAMED
+ --add-opens java.base/java.util=ALL-UNNAMED</argLine>
+ </properties>
</profile>
<profile>
<id>jdk15ge-simple</id>
@@ -826,7 +807,6 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkCount>1</forkCount>
- <argLine>${argline} ${jacocoArgLine}</argLine>
<systemProperties>
<!-- common shared -->
</systemProperties>
@@ -885,13 +865,6 @@
</properties>
</profile>
- <profile>
- <id>jacoco089</id>
- <properties>
- <maven_jacoco_version>0.8.9</maven_jacoco_version>
- </properties>
- </profile>
-
<profile>
<id>java11+</id>
<activation>