Skip to content
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

Please set default branch to 'main' in codecov.io #657

Open
Tranquility2 opened this issue Jul 26, 2024 · 6 comments
Open

Please set default branch to 'main' in codecov.io #657

Tranquility2 opened this issue Jul 26, 2024 · 6 comments

Comments

@Tranquility2
Copy link
Contributor

Describe the bug

Since we enabled the code coverage using Codecov Getting the error Please upload report for BASE (main@####).

To Reproduce

Just open a PR with any change:
image

Validate the issue
Click the Codecov badge or visit the site
This will use branch 'master', which is an old codecov result:
image

How to fix
A project administrator needs to visit https://app.codecov.io/gh/testcontainers/testcontainers-python/settings and change the default branch from 'master' to 'main'. It should look like this:
image

@Tranquility2
Copy link
Contributor Author

Follow-up on #544

@kiview
Copy link
Member

kiview commented Aug 1, 2024

I wanted to do it, but Codecov does not see the main branch for me:
image

Edit:
No clue what to do here, maybe re-adding Codecov so it has a refresh context?

@Tranquility2
Copy link
Contributor Author

I think I found the root source, the upload fails when running on "main" (so it has no idea about this branch)
for example: https://github.com/testcontainers/testcontainers-python/actions/runs/10200870537/job/28221518487
image
Error: Codecov token not found. Please provide Codecov token with -t flag. Warning: Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1

Codecov token not found

@Tranquility2
Copy link
Contributor Author

This is actually happening for all branches.. what I think is happening is that we don't have the token (or its not update to date in the secrets) so we do get some reports uploaded but its very partial (once every few runs)

@Tranquility2
Copy link
Contributor Author

We can try to Generate a new token, there is a guide:
https://docs.codecov.com/docs/adding-the-codecov-token

@alexanderankin
Copy link
Collaborator

tried pushing to master, ran into same issue with token not being found.

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

No branches or pull requests

3 participants