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

Add Codecov for test coverage reporting #401

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

saimedhi
Copy link
Collaborator

@saimedhi saimedhi commented Sep 25, 2024

Description

  • Add Codecov for test coverage reporting.

Issues Resolved

Related to #109

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@saimedhi saimedhi changed the title codecov test coverage integration Add Codecov for test coverage reporting Sep 25, 2024
@saimedhi saimedhi force-pushed the codecov branch 2 times, most recently from 69f3da0 to 5c5b43b Compare September 27, 2024 16:43
@saimedhi
Copy link
Collaborator Author

saimedhi commented Sep 27, 2024

Codecov token added is not getting detected by the workflows and throwing errors. Few other repos are experiencing similar issue. Commented on bug report in codecov library here. Waiting for the reply from codecov library team .

@saimedhi
Copy link
Collaborator Author

saimedhi commented Sep 30, 2024

  • @ohltyler, please take a look at this PR and merge it if possible.
  • From the conversation here, noticed that codecov workflow maynot succeed when Pull Request is raised but codecov update checks will succeed when PR is merged.
  • Also let me know if any changes needed in codecov.yml file

@ohltyler
Copy link
Member

Few questions:

  1. What is the reasoning for the extra params in the workflow step? In AD plugin, we just use the codecov-action (ref)
  2. Suggest we just add this once for one env (linux), instead of adding the step multiple times to prevent duplicate uploads. Or, even better, add as a standalone github workflow file that just handles the coverage so it is decoupled from this 'build and test' workflow. WDYT?

@saimedhi
Copy link
Collaborator Author

Few questions:

  1. What is the reasoning for the extra params in the workflow step? In AD plugin, we just use the codecov-action (ref)
  2. Suggest we just add this once for one env (linux), instead of adding the step multiple times to prevent duplicate uploads. Or, even better, add as a standalone github workflow file that just handles the coverage so it is decoupled from this 'build and test' workflow. WDYT?
  1. Added codecov token, which is optional but good to have.
  2. I agree that we should have codecov uploading step running only once. As in the codecov, I didn't see any platform specific codecov metrics. Made the change.

Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

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

LGTM thanks for adding!

@saimedhi saimedhi merged commit 09897ad into opensearch-project:main Sep 30, 2024
6 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 30, 2024
* Added Codecov for unit test coverage reporting

Signed-off-by: saimedhi <[email protected]>

* Added Codecov for unit test coverage reporting

Signed-off-by: saimedhi <[email protected]>

---------

Signed-off-by: saimedhi <[email protected]>
(cherry picked from commit 09897ad)
saimedhi added a commit that referenced this pull request Sep 30, 2024
* Added Codecov for unit test coverage reporting

Signed-off-by: saimedhi <[email protected]>

* Added Codecov for unit test coverage reporting

Signed-off-by: saimedhi <[email protected]>

---------

Signed-off-by: saimedhi <[email protected]>
(cherry picked from commit 09897ad)

Co-authored-by: Sai Medhini Reddy Maryada <[email protected]>
@saimedhi
Copy link
Collaborator Author

  • Codecov successfully updated for main, 2.x branches
  • Current code coverage is 48.44% as seen in below link.

https://app.codecov.io/gh/opensearch-project/dashboards-flow-framework/tree/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants