This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch test/codecov
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/test/codecov by this push:
new 5c06c2f098 Fixes
5c06c2f098 is described below
commit 5c06c2f098ade3766cef751ab17e606625bc350a
Author: Albumen Kevin <[email protected]>
AuthorDate: Sun Dec 1 21:16:38 2024 +0800
Fixes
---
.github/workflows/build-and-test-pr.yml | 65 ++++++++++++++++++++++++++-------
1 file changed, 52 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/build-and-test-pr.yml
b/.github/workflows/build-and-test-pr.yml
index c43b1e8397..4143b6d302 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -256,11 +256,11 @@ jobs:
if: failure()
run: cat test_errors.log
- name: "Upload coverage to Codecov"
- uses: codecov/codecov-action@v4
+ uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- version: v0.6.0
verbose: true
+ flags: unit-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: "Upload surefire reports"
@@ -475,9 +475,9 @@ 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]
+ needs: [check-format, samples-test-result]
steps:
- uses: actions/checkout@v4
with:
@@ -486,10 +486,6 @@ jobs:
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:
@@ -511,25 +507,68 @@ 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}}/dubbo"
+ - name: "Remove old test result"
+ run: |
+ rm -rf ${{ github.workspace }}/dubbo-samples
+ mv ${{ github.workspace }}/dubbo ${{ github.workspace }}
+ - 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
+ with:
+ path: "./dubbo"
+ - 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: |
+ cd ${{ github.workspace }}/dubbo
+ 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: "Remove old test result"
+ run: |
+ rm -rf ${{ github.workspace }}/dubbo-integration-cases
+ mv ${{ github.workspace }}/dubbo ${{ github.workspace }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- version: v0.6.0
+ flags: samples-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}