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

chore: fix incorrect coverage in code cov #269

Merged
merged 7 commits into from
Apr 28, 2023
Merged

chore: fix incorrect coverage in code cov #269

merged 7 commits into from
Apr 28, 2023

Conversation

homura
Copy link
Contributor

@homura homura commented Apr 26, 2023

What Changed

  • Run E2E testing before release
  • Change the coverage reporter

Motivation

The clover report is a bit strange, there are always some partial covered that are not well understood, I would like to try other reports to avoid this problem

image

The PR reveals a more honest test coverage, so test coverage is reduced since the unit tests only covered the business code, the files like PlatformService can't be covered since it must run in a Chrome extension environment.

According to this PR, I think we should

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major

@homura homura added the internal Changes only affect the internal API label Apr 26, 2023
@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #269 (9c10c78) into main (70784e2) will decrease coverage by 11.48%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main     #269       +/-   ##
===========================================
- Coverage   86.28%   74.80%   -11.48%     
===========================================
  Files          47       61       +14     
  Lines         933     1401      +468     
  Branches      119      197       +78     
===========================================
+ Hits          805     1048      +243     
- Misses         24      329      +305     
+ Partials      104       24       -80     
Impacted Files Coverage Δ
packages/utils/src/env.ts 100.00% <100.00%> (ø)

... and 44 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@homura homura marked this pull request as draft April 27, 2023 04:42
@homura
Copy link
Contributor Author

homura commented Apr 27, 2023

I found that this 97.53% coverage is not real, we may need to define the collectCoverageFrom instead of statistics only for files with tests

@homura homura added tests Add or improve existing tests and removed internal Changes only affect the internal API labels Apr 27, 2023
@homura homura requested review from zhangyouxin and IronLu233 April 27, 2023 13:37
@homura homura marked this pull request as ready for review April 27, 2023 13:37
@homura homura added the skip-release Preserve the current version when merged label Apr 28, 2023
@homura homura merged commit 8af649e into main Apr 28, 2023
@homura homura deleted the fix-coverage branch April 28, 2023 14:06
@github-actions
Copy link

github-actions bot commented May 4, 2023

🚀 PR was released in v0.0.19 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released. skip-release Preserve the current version when merged tests Add or improve existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants