This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 662166e87aa [fix][ci] Fix code coverage metrics in Pulsar CI (#24595)
662166e87aa is described below

commit 662166e87aa145b90966a7eb505af85f55fd7f24
Author: Lari Hotari <lhot...@users.noreply.github.com>
AuthorDate: Thu Jul 31 18:13:41 2025 +0300

    [fix][ci] Fix code coverage metrics in Pulsar CI (#24595)
    
    (cherry picked from commit 9543bda10c69966957d10afd1d72ceac53f0c88f)
---
 .github/actions/upload-coverage/action.yml | 13 ++++++++++---
 .github/workflows/pulsar-ci-flaky.yaml     |  1 +
 .github/workflows/pulsar-ci.yaml           |  3 +++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/.github/actions/upload-coverage/action.yml 
b/.github/actions/upload-coverage/action.yml
index da580dd28fd..5f887368d86 100644
--- a/.github/actions/upload-coverage/action.yml
+++ b/.github/actions/upload-coverage/action.yml
@@ -28,6 +28,10 @@ inputs:
   flags:
     # see https://github.com/codecov/codecov-action#arguments
     description: 'Flag the upload to group coverage metrics. Multiple flags 
are separated by a comma.'
+  token:
+    description: 'Codecov token to use for uploading coverage metrics.'
+    required: false
+    default: ''
 runs:
   using: composite
   steps:
@@ -51,11 +55,12 @@ runs:
     - name: "Upload to Codecov (attempt #1)"
       id: codecov-upload-1
       if: steps.repo-check.outputs.passed == 'true'
-      uses: codecov/codecov-action@v4
+      uses: codecov/codecov-action@v5
       continue-on-error: true
       with:
         flags: ${{ inputs.flags }}
         fail_ci_if_error: true
+        token: ${{ inputs.token }}
         verbose: true
     - name: "Wait 15 seconds before next attempt"
       if: steps.codecov-upload-1.outcome == 'failure'
@@ -64,11 +69,12 @@ runs:
     - name: "Upload to Codecov (attempt #2)"
       id: codecov-upload-2
       if: steps.codecov-upload-1.outcome == 'failure'
-      uses: codecov/codecov-action@v4
+      uses: codecov/codecov-action@v5
       continue-on-error: true
       with:
         flags: ${{ inputs.flags }}
         fail_ci_if_error: true
+        token: ${{ inputs.token }}
         verbose: true
     - name: "Wait 60 seconds before next attempt"
       if: steps.codecov-upload-2.outcome == 'failure'
@@ -77,12 +83,13 @@ runs:
     - name: "Upload to Codecov (attempt #3)"
       id: codecov-upload-3
       if: steps.codecov-upload-2.outcome == 'failure'
-      uses: codecov/codecov-action@v4
+      uses: codecov/codecov-action@v5
       # fail on last attempt
       continue-on-error: false
       with:
         flags: ${{ inputs.flags }}
         fail_ci_if_error: true
+        token: ${{ inputs.token }}
         verbose: true
     - name: "Show link to Codecov report"
       shell: bash
diff --git a/.github/workflows/pulsar-ci-flaky.yaml 
b/.github/workflows/pulsar-ci-flaky.yaml
index e002d007b9c..5c2c07c9cf8 100644
--- a/.github/workflows/pulsar-ci-flaky.yaml
+++ b/.github/workflows/pulsar-ci-flaky.yaml
@@ -272,6 +272,7 @@ jobs:
         continue-on-error: true
         with:
           flags: unittests
+          token: ${{ secrets.CODECOV_TOKEN }}
 
       - name: Upload Surefire reports
         uses: actions/upload-artifact@v4
diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index 49c31cb56ae..37ec50d72a9 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -472,6 +472,7 @@ jobs:
         uses: ./.github/actions/upload-coverage
         with:
           flags: unittests
+          token: ${{ secrets.CODECOV_TOKEN }}
 
       - name: Delete coverage files from build artifacts
         run: |
@@ -843,6 +844,7 @@ jobs:
         uses: ./.github/actions/upload-coverage
         with:
           flags: inttests
+          token: ${{ secrets.CODECOV_TOKEN }}
 
       - name: Delete coverage files from build artifacts
         run: |
@@ -1240,6 +1242,7 @@ jobs:
         uses: ./.github/actions/upload-coverage
         with:
           flags: systests
+          token: ${{ secrets.CODECOV_TOKEN }}
 
       - name: Delete coverage files from build artifacts
         run: |

Reply via email to