-
Notifications
You must be signed in to change notification settings - Fork 348
Attempt to make codecov less important #1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
This is is the codecov report for this PR I see extra context on the right in main, but seems a bit useless. what am i missing? |
@webknjaz what am i missing from the codecov report, the summed up report vs individual ^ (see comment above) |
The PR views are different and sometimes inaccurate in Codecov. I recommend always consulting the linked |
@kingbuzzman you're missing flags that can tell you exactly what environments covered each line. You should start setting them, though. |
.github/workflows/main.yml
Outdated
- name: Report coverage | ||
- name: Prepare coverage file for upload | ||
if: contains(matrix.name, 'coverage') | ||
uses: codecov/codecov-action@v5 | ||
run: mv .coverage coverage.${TOXENV} | ||
|
||
- name: Upload temporary coverage artifact | ||
if: contains(matrix.name, 'coverage') | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
fail_ci_if_error: true | ||
files: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, it'd be good to compute flags based on the matrix and env, as follows: https://github.com/tox-dev/workflow/blob/208490c/.github/workflows/reusable-tox.yml#L433-L444
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool, i'm playing with it now, thanks!
path: htmlcov | ||
retention-days: ${{ steps.determine-retention-days.outputs.retention_days }} | ||
|
||
- name: Delete temporary coverage artifacts from run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really that necessary, as you already set them to expire in one day. Plus, it'd be impossible to inspect these files whenever you suspect something's wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. But its just noise, i figure i'd leave it "clean" -- but you're not wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just that I've recently seen a DIY implementation of this causing CI stability issues due to GH API or network being flaky and causing chaos. That memory is still fresh :)
But also, these are about inspectability.
If you want fewer artifacts, you can run actions/upload-artifact/merge
and it'll do the deletion for you, replacing these with one artifact containing all the individual files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that i like! Thanks!
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@webknjaz this is why i want to remove codecov most of the time it works. but it always breaks in the most inopportune times... |
For an expired token, it makes sense to fail 🤷♂️ I recommend having that token to be stored in the plain text config for stability. Alternatively, they seem to have a tokenless upload button now. |
@webknjaz from my understanding is that the token is expiring because the upload is taking long [randomly] see how it normally takes 2s vs how it took 4m32s -- and because of that the token expired. |
That's a PR run. It may not get any token because it doesn't have access to secrets. It's possible that the log entry is a bit misleading. The slowness could be related to GitHub's own networking problems, though. They had an outage recently and usually some problems persist for some time after. |
Maybe.. not ruling that out. But i dont think its the token itself either, otherwise all of the other test steps would fail -- but yes, your guess is as good as mine was it would be a lot of different things we have 0 visibility into. |
Depends on #1202
Related to #1201 -- had to close it due to CI not running
This all started because yesterday codecov was having issues, and p!$#ed me off...
This PR aims to reduce the emphasis on Codecov by adjusting coverage exclusions in pyproject.toml and modifying the CI workflow to handle coverage reporting differently.
Revise the CI workflow to use ubuntu-latest, update Tox versions, and introduce dedicated coverage reporting and artifact handling steps.Miscellaneous:
CI now runs on all branches -- instead of those that were pointing tomain
onlyUpdated tox version since python 3.8 is gone!