Skip to content

Commit

Permalink
ci: bump codecov-action to v4 (acts-project#3215)
Browse files Browse the repository at this point in the history
## Issue
For about a week, we did not get any coverage reports added to PRs.
Reason was a failing upload, due to the codecov rate limit.
`[2024-05-24T09:08:19.271Z] ['error'] There was an error running the
uploader: Error uploading to https://codecov.io: Error: There was an
error fetching the storage URL during POST: 429 - {'detail':
ErrorDetail(string='Rate limit reached. Please upload with the Codecov
repository upload token to resolve issue. Expected time to availability:
2453s.', code='throttled')}`

## Solution - Update from `codecov-action@v3` to `codecov-action@v4`.
To keep the same coverage, we need to add the flag `disable_search:
true`. Otherwise, around 1500 coverage files would be uploaded and
increase our coverage from 50% to 85%. This solution was suggested in:
- codecov/codecov-action#1354

Maybe we need to add the token as `token: ${{ secrets.CODECOV_TOKEN }}`,
when we run into the rate-limit again. But it might not necessary, since
they enabled token-free uploads for forks of open-source repositories.

## Coverage Change -1.63%
The change seems to be due to 2 reasons:
- The old HEAD lies 14 commits in the past
- Ending `}` are not counted as "covered" and just ignored. Therefore
the relative amount of uncovered parts is increased.
  • Loading branch information
AJPfleger authored May 24, 2024
1 parent 273278b commit 50fc28f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
paths-ignore:
- "docs/**"

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

Expand Down Expand Up @@ -67,9 +67,10 @@ jobs:
&& cd build
&& /usr/bin/python3 ../CI/test_coverage.py
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./build/coverage/cov.xml
disable_search: true

build_performance:
runs-on: ubuntu-latest
Expand All @@ -95,7 +96,7 @@ jobs:
with:
name: cmakeperf
path: perf.csv

metric_tracking:
runs-on: ubuntu-latest
needs: build_performance
Expand Down

0 comments on commit 50fc28f

Please sign in to comment.