CI: add codecov to Azure CI#2720
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2720 +/- ##
===========================================
+ Coverage 91.43% 92.18% +0.74%
===========================================
Files 178 183 +5
Lines 23479 23977 +498
Branches 3090 3090
===========================================
+ Hits 21469 22104 +635
- Misses 1421 1808 +387
+ Partials 589 65 -524
Continue to review full report at Codecov.
|
|
I still see |
|
How sensitive is the upload token? The codecov instructions (from the settings) say
codecov:
token: xxxxxor Set in your environment variables CODECOV_TOKEN="xxxx"On travis we could encrypt the token. Can we add it to Azure encrypted or via configuration? |
|
I've saved the encrypted codecov token in Azure UI configuration, but I think it does not get automatically decrypted. If the CI fails to upload again this time I'll have to use the mapping techniques they describe to decrypt in the docs for Azure secret vars |
|
Ok, I need to decrypt the token still it seems |
|
Do you have access to the decrypted codecov token, i.e., when you go to https://codecov.io/gh/MDAnalysis/mdanalysis/settings and login with GitHub, can you see it? |
|
Yeah, I just need to follow the Azure docs to use it properly. I'll be slow, but should get it done. Failing that, the new codecov team is pretty responsive to GitHub pings, but will try on my own first. |
f276e64 to
4358b39
Compare
|
Now it says |
|
Hmmm, I'm not sure why that is. I copy and pasted my token into this project here (and actually used your yaml as a template): https://dev.azure.com/tomhu1096/codecov-github-test/_build/results?buildId=8&view=logs&j=e4f8c82b-de6b-5575-3950-14744af47318&t=9fea38d8-bc43-58c0-468d-6e85974c7041 Are you adding quotes or spaces or anything like that? |
|
I checked the "Keep this value secret" option, so I think the decryption component of the workflow may be adding some additional complication. Is there no reason to keep the codecov tokens secret? If not, then I'll just do away with that and maybe it will work like yours does. |
|
@tylerjereddy apologies, I actually had the |
|
My setup should have been the same--I've tried deleting and setting up the variable again with a fresh copy-paste of the token. |
|
Same thing--possible differences with your setup might be:
|
|
@tylerjereddy, I see this is still an issue. Would you be able to echo |
|
I'll see what I can do--I should maybe check if the token is used anywhere else first, but I think most CI services don't even need it for public repos. The most recent attempt was with quotes added--the first two had no quotes. |
|
I don't think we use the token elsewhere. Just change it when done. |
4358b39 to
123f88e
Compare
|
Ok, I've added an echo for the variable--we'll see what happens I guess |
|
Hmmm... I'm going to fork the repo and make the change to see why this might be happening sometime tonight or tomorrow. Sorry this is blocking your usage of Codecov on AzureCI |
|
@tylerjereddy, we did some work on the Azure pipelines side of things which may have helped with this issue. My build now seems to work, and you can see the build report here. Could you try running this again to see if it's been fixed? |
* add a codecov upload to Azure CI (32-bit Windows) * I was a bit surprised that we don't seem to have a `yaml` file for codecov settings (?), so I didn't add a lint stage for our codecov config
123f88e to
904f162
Compare
|
@thomasrockhu Cool, I've rebased and force pushed to trigger the rebuild :) |
thomasrockhu
left a comment
There was a problem hiding this comment.
Apologies, we fixed an issue with tokenless Azure uploads for public repositories, so you don't have to specify the token at all anymore
Co-authored-by: Thomas Hu <thomasrockhu@users.noreply.github.com>
Co-authored-by: Thomas Hu <thomasrockhu@users.noreply.github.com>
|
thanks, I committed your suggestions just now |
|
@tylerjereddy success! |
|
Great! The PR should be ready to merge when the rest of the CI completes. I assume we can ignore the complaint from |
|
@tylerjereddy, yes the |
|
Well, that increased our coverage by almost 1%! Thank you @thomasrockhu for helping, much appreciated! (And makes me happy to use codecov for other projects!) |
orbeckst
left a comment
There was a problem hiding this comment.
I am very happy with getting coverage from Azure, too. Thank you @thomasrockhu and @tylerjereddy for figuring it out.
|
@tylerjereddy I‘ll leave it to you to squash and merge, just in case you want to refine anything. |
|
@orbeckst happy to help! |
* CI: add codecov to Azure CI * add a codecov upload to Azure CI (32-bit Windows) Co-authored-by: Thomas Hu <thomasrockhu@users.noreply.github.com>
* CI: add codecov to Azure CI * add a codecov upload to Azure CI (32-bit Windows) Co-authored-by: Thomas Hu <thomasrockhu@users.noreply.github.com>


add a codecov upload to Azure CI (32-bit
Windows)
I was a bit surprised that we don't
seem to have a
yamlfile for codecovsettings (?), so I didn't add a lint
stage for our codecov config
reviewers should check carefully that the upload actually happens because the job passed without uploading on my fork (i.e., the upload utility ran, but then exited with
Commit sha does not match Azure build. Please upload with the Codecov repository upload token to resolve issue., hopefully just because it was on my fork...)Changes made in this Pull Request:
PR Checklist