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(coverage): add total typescript code coverage statistics #2661

Closed
petermetz opened this issue Sep 7, 2023 · 1 comment · Fixed by #3285
Closed

ci(coverage): add total typescript code coverage statistics #2661

petermetz opened this issue Sep 7, 2023 · 1 comment · Fixed by #3285
Assignees
Labels
Developer_Experience documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed P2 Priority 2: High Tests Anything related to tests be that automatic or manual, integration or unit, etc.
Milestone

Comments

@petermetz
Copy link
Member

petermetz commented Sep 7, 2023

Description

As a maintainer I want to know if we have a reasonable amount of coverage so that I'm more confident in the production readiness of the codebase.

Note: 'reasonable amount' is highly subjective. This issue is not about asserting what that percentage is because it varies. My personal opinion is that critical code-paths need 100% code coverage, especially for catch blocks (error handling) while non-critical code-paths can get away with the bare minimum or no coverage at all.

More context:
We have used https://about.codecov.io/ in the past but then we had to break the test execution up into several (dozens) of separate GH Action Workflow jobs and we can no longer measure total code coverage as of right now.
This issue is about figuring out how to remedy that and get us back on track with a metric that we can use on a badge in the readme.

Additional context on 2024-02-15

The steps I'd take to solving this:

  1. Research and figure out how can coverage reports be either merged or separately uploaded to codecov and then have codecov merge the statistics themselves. The latter is preferred if achievable, but the former is the likely outcome.
  2. Once the merging is figured out, we can update the ci tasks that are running Jest tests to do the uploading of the statistics to codecov.
  3. Screenshots below showing what are the files that are being generated when --coverage is passed in to Jest

image

image

Acceptance Criteria

  1. Total code coverage metric re-introduced.
  2. No major refactor on the CI needed. This is important because there are already other factors at play about how we structure the jobs/workflows that are more important (performance which is $$$ because of billed hours the CI has to run)
@petermetz petermetz added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed Developer_Experience Tests Anything related to tests be that automatic or manual, integration or unit, etc. P2 Priority 2: High labels Sep 7, 2023
@petermetz petermetz modified the milestones: vT.B.D, v2.0.0 Sep 7, 2023
@petermetz petermetz self-assigned this Sep 7, 2023
@petermetz petermetz changed the title ci(coverage): add total code coverage statistics ci(coverage): add total typescript code coverage statistics Sep 7, 2023
@petermetz petermetz removed their assignment Oct 2, 2023
@petermetz
Copy link
Member Author

@aldousalvarez I've added some more information to the issue description, please let me know this helps getting along with the task!

aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue May 31, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue May 31, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 19, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 19, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 19, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 19, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 20, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jul 2, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jul 10, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jul 12, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
raynatopedrajeta pushed a commit to raynatopedrajeta/cacti that referenced this issue Jul 15, 2024
Primary Changes
----------------
1. Updated the ci.yaml and ci.sh to introduce total typescript code coverage
   statistics using jest and istanbul-merge
2. Added Codecov to cspell.json

Fixes hyperledger#2661

Signed-off-by: aldousalvarez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer_Experience documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed P2 Priority 2: High Tests Anything related to tests be that automatic or manual, integration or unit, etc.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants