testcontainers-python icon indicating copy to clipboard operation
testcontainers-python copied to clipboard

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

Open Tranquility2 opened this issue 1 year ago • 6 comments

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 avatar Jul 26 '24 16:07 Tranquility2

Follow-up on #544

Tranquility2 avatar Aug 01 '24 06:08 Tranquility2

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?

kiview avatar Aug 01 '24 08:08 kiview

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 avatar Aug 01 '24 15:08 Tranquility2

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 avatar Aug 01 '24 15:08 Tranquility2

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

Tranquility2 avatar Aug 01 '24 15:08 Tranquility2

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

alexanderankin avatar Aug 14 '24 13:08 alexanderankin