This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new 0635bdc4cc collect jacoco result (#11532)
0635bdc4cc is described below
commit 0635bdc4cc03a72d3edd5fcc920c35a635b7b1a9
Author: Albumen Kevin <[email protected]>
AuthorDate: Tue Feb 14 10:40:14 2023 +0800
collect jacoco result (#11532)
---
.github/workflows/build-and-test-pr.yml | 74 ++++++++++++++++++++++++++++++++-
1 file changed, 72 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build-and-test-pr.yml
b/.github/workflows/build-and-test-pr.yml
index a5438d7bb4..28d9bae045 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -11,6 +11,7 @@ env:
SHOW_ERROR_DETAIL: 1
#multi-version size limit
VERSIONS_LIMIT: 4
+ JACOCO_ENABLE: true
CANDIDATE_VERSIONS: '
spring.version:4.3.30.RELEASE;
spring-boot.version:1.5.22.RELEASE;
@@ -71,6 +72,22 @@ jobs:
run: |
cd ./dubbo
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast clean source:jar install -Pjacoco,checkstyle
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Dmaven.wagon.http.retryHandler.count=5 -Dmaven.test.skip=true
-Dmaven.test.skip.exec=true -DembeddedZookeeperPath=${{ github.workspace
}}/.tmp/zookeeper
+ - name: "Pack class result"
+ run: 7z a ${{ github.workspace }}/class.zip */target/classes/* -r
+ - name: "Upload class result"
+ uses: actions/upload-artifact@v3
+ with:
+ name: "class-file"
+ path: ${{ github.workspace }}/class.zip
+ - name: "Pack rat file if failure"
+ if: failure()
+ run: 7z a ${{ github.workspace }}/rat.zip *rat.txt -r
+ - name: "Upload rat file if failure"
+ if: failure()
+ uses: actions/upload-artifact@v3
+ with:
+ name: "rat-file"
+ path: ${{ github.workspace }}/rat.zip
- name: "Pack checkstyle file if failure"
if: failure()
run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
@@ -196,8 +213,11 @@ jobs:
timeout-minutes: 70
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast clean test verify
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -DtrimStackTrace=false
-Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false
-DskipIntegrationTests=false -Dcheckstyle.skip=false
-Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true
-DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
- - name: "Upload coverage to Codecov"
- uses: codecov/codecov-action@v3
+ - name: "Upload coverage result"
+ uses: actions/upload-artifact@v3
+ with:
+ name: coverage-result
+ path: "**/target/site/**/jacoco.xml"
integration-test-prepare:
runs-on: ubuntu-latest
@@ -270,6 +290,14 @@ jobs:
cd test && bash ./build-test-image.sh
- name: "Run tests"
run: cd test && bash ./run-tests.sh
+ - name: "merge jacoco resule"
+ run: |
+ cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoMerge"
-Dexec.args="${{github.workspace}}"
+ - name: "Upload jacoco"
+ uses: actions/upload-artifact@v3
+ with:
+ name: jacoco-result
+ path: target/jacoco*.exec
- name: "Upload test result"
if: always()
uses: actions/upload-artifact@v3
@@ -296,6 +324,48 @@ jobs:
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
+ jacoco-result-merge:
+ runs-on: ubuntu-latest
+ needs: [integration-test-result, unit-test]
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ path: "./dubbo"
+ - uses: actions/checkout@v3
+ with:
+ repository: 'apache/dubbo-samples'
+ path: "./dubbo-samples"
+ - name: "Set up JDK 17"
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: 17
+ - name: "Restore class result"
+ uses: actions/download-artifact@v3
+ with:
+ name: "class-file"
+ path: ${{ github.workspace }}
+ - name: "Unpack class result"
+ run: |
+ cd ${{ github.workspace }}/dubbo
+ unzip -o ${{ github.workspace }}/class.zip
+ - name: "Restore jacoco exec"
+ uses: actions/download-artifact@v3
+ with:
+ name: jacoco-result
+ path: dubbo-samples/target/
+ - name: "Merge 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: "Restore coverage result"
+ uses: actions/download-artifact@v3
+ with:
+ name: coverage-result
+ path: dubbo/
+ - name: "Upload coverage to Codecov"
+ uses: codecov/codecov-action@v3
+
error-code-inspecting:
runs-on: ubuntu-latest
steps: