This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 3456532658ede650befb849bf35e7f7ad92c5489 Author: Lari Hotari <[email protected]> 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 c1d0e3ae3f5..8e2986217e7 100644 --- a/.github/workflows/pulsar-ci-flaky.yaml +++ b/.github/workflows/pulsar-ci-flaky.yaml @@ -247,6 +247,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 150d2110419..0c84cecb471 100644 --- a/.github/workflows/pulsar-ci.yaml +++ b/.github/workflows/pulsar-ci.yaml @@ -446,6 +446,7 @@ jobs: uses: ./.github/actions/upload-coverage with: flags: unittests + token: ${{ secrets.CODECOV_TOKEN }} - name: Delete coverage files from build artifacts run: | @@ -788,6 +789,7 @@ jobs: uses: ./.github/actions/upload-coverage with: flags: inttests + token: ${{ secrets.CODECOV_TOKEN }} - name: Delete coverage files from build artifacts run: | @@ -1166,6 +1168,7 @@ jobs: uses: ./.github/actions/upload-coverage with: flags: systests + token: ${{ secrets.CODECOV_TOKEN }} - name: Delete coverage files from build artifacts run: |
