-
Notifications
You must be signed in to change notification settings - Fork 915
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
[Backport 1.x] Adds code coverage reporting (#1478) #3293
[Backport 1.x] Adds code coverage reporting (#1478) #3293
Conversation
4a31624
to
6973f50
Compare
"test:jest_integration": "node scripts/jest_integration", | ||
"test:mocha": "node scripts/mocha", | ||
"test:mocha:coverage": "grunt test:mochaCoverage", | ||
"test:mocha:coverage": "yarn nyc --reporter=text-summary --reporter=lcov --report-dir=./target/opensearch-dashboards-coverage/mocha node scripts/mocha", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know that these work in 1.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried running the above cmd, I got all the tests passing with below summary
411 passing (7s)
=============================== Coverage summary ===============================
Statements : 45.54% ( 1956/4295 )
Branches : 20.79% ( 431/2073 )
Functions : 25.82% ( 228/883 )
Lines : 46.59% ( 1908/4095 )
================================================================================
Done in 16.20s.```
looks like the bootstrap step failed on downloading geckodriver |
I think it's flaky. In the last run, it was passing bootstrap https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/3962638107/jobs/6789549417#step:12:1232 |
yeah, that's usually the case when it errors on fetching some resource. |
* Renames build and test workflow to eliminate ambiguity. * Adds coverage generation for jest and mocha tests. * Expands coverage collection for jest tests. * Utilizes `lcov` reporter as well as text summary reporter. Resolves opensearch-project#1339 Prerequisite for opensearch-project#1035 Signed-off-by: Tommy Markley <[email protected]> (cherry picked from commit 1caf907)
6973f50
to
68f1bfb
Compare
lcov
reporter as well as text summary reporter.Resolves #1339
Prerequisite for #1035
Signed-off-by: Tommy Markley [email protected]
(cherry picked from commit 1caf907)
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr