You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to improve code coverage on #2430. The build is passing all the unit and integ tests, but is failing on lack of coverage:
> Task :opensearch-ml-plugin:test
> Task :opensearch-ml-plugin:jacocoTestReport
[ant:jacocoReport] Rule violated for class org.opensearch.ml.sdkclient.RemoteClusterIndicesClient: branches covered ratio is 0.5, but expected minimum is 0.7
[ant:jacocoReport] Rule violated for class org.opensearch.ml.sdkclient.LocalClusterIndicesClient: branches covered ratio is 0.5, but expected minimum is 0.7
I'm covering about half of my branches, but honestly I don't know which ones I'm missing.
The code coverage report would tell me, but it doesn't run, because it's placed after the test in the CI yaml.
- name: Build and Run Testsid: step-build-test-linuxrun: | // unit and integ tests
- name: Upload Coverage Reportuses: codecov/codecov-action@v1
This presents an extremely frustrating experience for a developer.
How can one reproduce the bug?
Steps to reproduce the behavior:
Submit a PR with a file that does not meet minimum code coverage requirements but otherwise passes tests.
Observe a lack of coverage reports.
What is the expected behavior?
When the specific reason for the build failure is lack of coverage, the specific lines/branches missed should be available to the developer somewhere.
What is your host/environment?
OS: Both Linux and WIndows CI
Do you have any additional context?
If codecov was placed in a separate workflow, it would always run. This gives the added benefit of ensuring the coverage comment is (one of) the first one on the PR and easier for reviewers to find. It would still fail that other workflow, although not quite as visibly as the tests.
Alternately if the desire is to keep the entire test failing on low coverage, the jacocoTestReport gradle task could be moved until after the coverage run in the workflow.
The text was updated successfully, but these errors were encountered:
What is the bug?
I'm trying to improve code coverage on #2430. The build is passing all the unit and integ tests, but is failing on lack of coverage:
I'm covering about half of my branches, but honestly I don't know which ones I'm missing.
The code coverage report would tell me, but it doesn't run, because it's placed after the test in the CI yaml.
This presents an extremely frustrating experience for a developer.
How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
When the specific reason for the build failure is lack of coverage, the specific lines/branches missed should be available to the developer somewhere.
What is your host/environment?
Do you have any additional context?
If codecov was placed in a separate workflow, it would always run. This gives the added benefit of ensuring the coverage comment is (one of) the first one on the PR and easier for reviewers to find. It would still fail that other workflow, although not quite as visibly as the tests.
Alternately if the desire is to keep the entire test failing on low coverage, the
jacocoTestReport
gradle task could be moved until after the coverage run in the workflow.The text was updated successfully, but these errors were encountered: