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

CI: Add code coverage #140

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

CI: Add code coverage #140

wants to merge 2 commits into from

Conversation

namannimmo10
Copy link
Member

No description provided.

@namannimmo10 namannimmo10 force-pushed the codecov branch 2 times, most recently from 12c4853 to 0c27ac0 Compare July 18, 2024 14:36
@namannimmo10
Copy link
Member Author

Unable to push coverage to Codecov as git is not available with this container image.

@yousefmoazzam
Copy link
Contributor

Unable to push coverage to Codecov as git is not available with this container image.

Ah I see, that's a pain... Might be a dumb question, but is it possible to do an apt install -y git step (or something similar depending on what package manager is available in the container image) in the workflow to make git available? Not ideal, but if it works, that could be a workaround for now.

@namannimmo10
Copy link
Member Author

namannimmo10 commented Jul 18, 2024

No, cannot have sudo permissions easily. Trying to find a workaround!

@namannimmo10
Copy link
Member Author

One option is to add a Dockerfile.

@yousefmoazzam
Copy link
Contributor

Eh, that's kinda annoying, not allowing use of sudo within a container - what harm can it do, it's a container...

But fair enough, good luck trying to find a workaround, feels like it might be a pain 😅

@namannimmo10 namannimmo10 force-pushed the codecov branch 5 times, most recently from c6acbb4 to 51d2652 Compare July 19, 2024 11:51
@yousefmoazzam
Copy link
Contributor

yousefmoazzam commented Jul 19, 2024

FYI, there's a github action for uploading coverage to codecov, could be useful instead of trying to manually do it in a shell in a step in the workflow https://github.com/codecov/codecov-action (apologies if this has already been looked at and was found to be incompatible with the IRIS runner or something!)

@namannimmo10
Copy link
Member Author

Yeah - I tried a7abd29 before, but it's unable to find git. Think we are nearly there.

@namannimmo10 namannimmo10 force-pushed the codecov branch 13 times, most recently from a940bbf to 3f7fe8b Compare July 22, 2024 14:20
@namannimmo10 namannimmo10 force-pushed the codecov branch 2 times, most recently from fcf0ca3 to 98bbdbd Compare August 15, 2024 13:34
@namannimmo10
Copy link
Member Author

So peculiar. Same error again. Raised codecov/codecov-action#1546.

@yousefmoazzam
Copy link
Contributor

I was just perusing the issues and PRs, looked at the issue raised with the codecov action, and this error repeated twice at the end got me thinking a bit:

POST: 404 - {'detail': ErrorDetail(string='Could not find a repository associated with upload token ***', code='not_found')}

Does the repo in the relevant github organisation (DiamondLightSource) for which we want to get code coverage need to be setup on https://app.codecov.io/github/DiamondLightSource?

If I search for "httomo", I can see that httomolibgpu has the "Configure" button on the right, which suggests that it hasn't been "configured" to have code coverage uploaded to it?
codecov-io-httomo

If that was the issue, I could maybe understand the error being returned; it's essentially saying that coverage is trying to be uploaded for a github repo that isn't configured for that in codecov's website.

The docs for codecov suggest that this needs to be done https://docs.codecov.com/docs/quick-start#step-1-sign-up-for-codecov

@namannimmo10
Copy link
Member Author

Hi, thanks for pointing this out, see this discussion: https://diamondlightsource.slack.com/archives/CKW8E0V4H/p1721394261955809.

@yousefmoazzam
Copy link
Contributor

Fair enough. Though in my opinion, because the responder said that they're "not sure", I would not consider this a proof that stuff on codecov doesn't need to be done. Especially as there's no explanation for how it automatically gets done from simply being a repo in the DiamondLightSource organisation, and the fact that the codecov docs indicate that something does need to be done.

If I choose random repos from the DiamondLightSource organisation which are marked as "Configured" in codecov, they all are using the codecov github action, and if I choose random repos which are marked as "Not configured" in codecov, they do not use the codecov github action.

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.

2 participants