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 report is calculated before running tests #2227

Merged
merged 4 commits into from
Apr 4, 2023

Conversation

delaramamiri
Copy link
Contributor

@delaramamiri delaramamiri commented Mar 23, 2023

closes #1884

Description

code cov calculates the coverage of tests right before CI/CD build and even running any tests( #1866 (comment)).
This will create confusion whether the coverage change is correct or not. In fact, it computes the numbers before all the tests are complete, which is skewing the numbers.

Testing

Updated the number of after_n_builds to reflect the correct threshold. More information about this flag is listed here.

Documentation

N/A

@Alan-Jowett
Copy link
Member

I don't see any code coverage results for this build. How was the number 28 computed?

saxena-anurag
saxena-anurag previously approved these changes Mar 23, 2023
.github/codecov.yml Outdated Show resolved Hide resolved
@saxena-anurag saxena-anurag self-requested a review March 24, 2023 01:31
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #2227 (f843bdc) into main (b7429c9) will decrease coverage by 0.06%.
The diff coverage is n/a.

❗ Current head f843bdc differs from pull request most recent head c23e4bc. Consider uploading reports for the commit c23e4bc to get more accurate results

@@            Coverage Diff             @@
##             main    #2227      +/-   ##
==========================================
- Coverage   83.67%   83.61%   -0.06%     
==========================================
  Files         151      151              
  Lines       28214    28249      +35     
==========================================
+ Hits        23608    23621      +13     
- Misses       4606     4628      +22     

see 53 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

dthaler
dthaler previously approved these changes Mar 25, 2023
.github/codecov.yml Outdated Show resolved Hide resolved
saxena-anurag
saxena-anurag previously approved these changes Mar 30, 2023
@saxena-anurag saxena-anurag added this pull request to the merge queue Mar 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 30, 2023
dthaler
dthaler previously approved these changes Mar 31, 2023
.github/codecov.yml Outdated Show resolved Hide resolved
@dthaler dthaler dismissed their stale review March 31, 2023 04:24

New comment

@dthaler dthaler added bug Something isn't working tests labels Mar 31, 2023
Copy link
Member

@Alan-Jowett Alan-Jowett left a comment

Choose a reason for hiding this comment

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

I believe there are more than 6 cases.

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
@Alan-Jowett Alan-Jowett added this pull request to the merge queue Apr 4, 2023
Merged via the queue into microsoft:main with commit 0ad5f93 Apr 4, 2023
@delaramamiri delaramamiri deleted the delaramamiri/codecov branch May 9, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code coverage report is calculated before running tests
4 participants