Skip to content

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Apr 29, 2025

Helps #7.

Run tests with coverage, and send to the terminal and Codecov, so we get reports like https://github.com/hugovk/pymanager/actions/runs/14727134371/job/41332386214#step:8:218 and https://app.codecov.io/gh/hugovk/pymanager/tree/coverage

Fix a reused test name that meant the test wasn't run, found from looking at test coverage results.

@zooba
Copy link
Member

zooba commented Apr 29, 2025

Thanks! Not as bad as I feared (though it looks pretty bad... lot of missed code is for error handling though).

Hopefully the potential rate of increase will encourage people to help out.

@zooba zooba merged commit fb91f7b into python:main Apr 29, 2025
4 checks passed
@zooba
Copy link
Member

zooba commented Apr 29, 2025

@hugovk I'm not seeing any coverage comparisons, and it looks like the main branch can't upload reports (see https://github.com/python/pymanager/actions/runs/14733127892/job/41352261374).

Any idea exactly what settings should be tweaked here? Is the token referred to in that build the GitHub token (I disabled write access by default, because we shouldn't ever write directly to the repo from a build, but perhaps codecov needs it?)

@hugovk hugovk deleted the coverage branch April 29, 2025 15:29
@hugovk
Copy link
Member Author

hugovk commented Apr 29, 2025

A token isn't needed any more, we can set it to to tokenless. https://app.codecov.io/gh/python/pymanager says:

You must now upload using a token. Upload with eitherthe global upload token or the repo upload token. Contact your admins to manage the upload token settings.

@python/organization-owners Please could you go to https://app.codecov.io/account/gh/python/org-upload-token and select "Not required"?

image

@JacobCoffee
Copy link
Member

@hugovk this is okay to do for the entire org?

@ewdurbin
Copy link
Member

Please keep tokens scoped to individual projects.

@hugovk
Copy link
Member Author

hugovk commented Apr 29, 2025

Yeah, I think so, and it's the default for new orgs: https://docs.codecov.com/docs/codecov-tokens#uploading-without-a-token

@hugovk
Copy link
Member Author

hugovk commented Apr 29, 2025

Please keep tokens scoped to individual projects.

Sure, please could you add a token to this repo secrets?

@hugovk
Copy link
Member Author

hugovk commented Apr 29, 2025

Actually, we already have a secrets.CODECOV_ORG_TOKEN, let's use that.

I'll open a new PR. Sorry for the needless pings!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants