-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Enable build failure when code coverage is below threshold #7228
Conversation
@@ -333,6 +333,31 @@ | |||
<outputDirectory>${project.reporting.outputDirectory}/test-coverage</outputDirectory> | |||
</configuration> | |||
</execution> | |||
<execution> |
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.
@JonathanGiles is this particular change going to require us to up the version and re-release the parent pom?
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.
@JimSuplizio since this change only introduces a check to fail the build when test coverage is low, it's not end user-facing. So, version update and re-release is not necessary.
/azp run java - core - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
pom.client.xml
Outdated
<limit> | ||
<counter>BRANCH</counter> | ||
<value>COVEREDRATIO</value> | ||
<minimum>0.09</minimum> |
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.
Is it worth extracting these two minimum values out to properties so that child poms may overwrite this (in the future when we start setting a valid minimum and libraries need to opt-out for a valid reason)?
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.
Yes, updated this to use properties and also customized the threshold for a couple of storage modules that had really low coverage to:
- demonstrate how to customize the threshold per module
- increase the base threshold to a much higher number than 9%
This PR includes two changes:
archetype-sdk-client.yml
which were previously configured inclient.yml