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

Code coverage checks and reports #62

Merged
merged 19 commits into from
Aug 7, 2023

Conversation

hsubramanianaks
Copy link
Collaborator

This PR is for generating code coverage reports via c8 library and uploading them via codecov github action here

image

image

Sample Code Cove report

https://app.codecov.io/github/hsubramanianaks/vscode-bridge-to-kubernetes/commit/32888d1f7e1a2ef1ff5f3e5ddbd93c242092e6b9/tree/src/clients

Also PR comment will be generated by codecov stating Code Coverage reports here

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@5783704). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage        ?   63.37%           
=======================================
  Files           ?       23           
  Lines           ?     1977           
  Branches        ?       72           
=======================================
  Hits            ?     1253           
  Misses          ?      724           
  Partials        ?        0           
Flag Coverage Δ
unittests 63.27% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@hsubramanianaks hsubramanianaks marked this pull request as ready for review August 3, 2023 01:51
@Tatsinnit
Copy link
Member

Tatsinnit commented Aug 3, 2023

💡🙏 Thank you so much for this, Here is my 2 cents: please note some key points if we plan to make this codecov public that we stay true to the actual reality and future plans around it for how to. I guess this is great place where we can learn for various other project which might have similar issue aka well developed and matured and since they were legacy the codecov was not the initial thinking process. ☕️

Like:

  • What is the current whole repo level coverage number?
    * Answer the whole repo is +63% which is not bad: Details link here

Reference to the codecov for this work

Screenshot 2023-08-04 at 6 36 26 AM

@@ -3,23 +3,26 @@
// ----------------------------------------------------------------------------
'use strict';

import {
runTests
} from '@vscode/test-electron';
import * as path from 'path';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Just as a note: I see this kind of really solves the mystery for me, essentially all these tests already existed, and upon adding the test runner and coverage we get 63% coverage for free, which is a win! 🐴🚀🔔

@hsubramanianaks
Copy link
Collaborator Author

hsubramanianaks commented Aug 4, 2023

💡🙏 Thank you so much for this, Here is my 2 cents: please note some key points if we plan to make this codecov public that we stay true to the actual reality and future plans around it for how to. I guess this is great place where we can learn for various other project which might have similar issue aka well developed and matured and since they were legacy the codecov was not the initial thinking process. ☕️

Like:

  • What is the current whole repo level coverage number?

Reference to the codecov for this work

Screenshot 2023-08-04 at 6 36 26 AM

@Tatsinnit thanks for your thoughts. My thought was to add this code cov at least not to reduce the existing 63% for future upcoming PR's and add a work item to increase the coverage for existing unit tests and for files which are missing unit test cases. I agree lot of this was well developed and matured but there is also lot of code which is legacy and some parts of it is not used. we can use this opportunity to refactor them and remove unused/dead code, also learn more in depth about this vscode extension. Please let me know your thoughts further on this and also how other extensions are achieving the same.

Copy link
Member

@bfoley13 bfoley13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see you were able to use the codecov here as well!

@Tatsinnit Tatsinnit merged commit 6e3ffd8 into Azure:main Aug 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🧑‍🔧💡 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants