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

commit ebd321ee844f11e486c6c15a3b4c45815c626070
Author: Albumen Kevin <[email protected]>
AuthorDate: Sun Dec 1 16:53:14 2024 +0800

    Test codecov upload
---
 .github/workflows/build-and-test-pr.yml | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/build-and-test-pr.yml 
b/.github/workflows/build-and-test-pr.yml
index 5455362ebe..7ae03a8f83 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -255,11 +255,14 @@ jobs:
       - name: "Print test error log"
         if: failure()
         run: cat test_errors.log
-      - name: "Upload coverage result"
-        uses: actions/upload-artifact@v4
+      - name: "Upload coverage to Codecov"
+        uses: codecov/codecov-action@v4
         with:
-          name: coverage-result
-          path: "**/target/site/**/jacoco.xml"
+          token: ${{ secrets.CODECOV_TOKEN }}
+          version: v0.6.0
+          verbose: true
+        env:
+          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
 
   samples-test-prepare:
     needs: check-format
@@ -469,7 +472,7 @@ jobs:
 
   jacoco-result-merge:
     runs-on: ubuntu-latest
-    needs: [check-format, integration-test-result, samples-test-result, 
unit-test]
+    needs: [check-format, integration-test-result, samples-test-result]
     steps:
       - uses: actions/checkout@v4
         with:
@@ -517,18 +520,14 @@ jobs:
         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/
       - name: "Upload coverage to Codecov"
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v4
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           version: v0.6.0
           verbose: true
+          root_dir: ${{ github.workspace }}/dubbo
+          working-directory: ${{ github.workspace }}/dubbo
         env:
           CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
 

Reply via email to