mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Push method code coverage bar to 50 percent
This change adds or update a swath of tests to push method code coverage numbers up. Yes, method coverage is not super meaningful, but it is one metric that we can use to ensure at least minimal coverage of this library. Almost no product changes in here.
This commit is contained in:
41
pom.xml
41
pom.xml
@@ -41,8 +41,8 @@
|
||||
<okio.version>2.5.0</okio.version>
|
||||
<spotless-maven-plugin.goal>apply</spotless-maven-plugin.goal>
|
||||
<!-- Using this as the minimum bar for code coverage. Adding methods without covering them will fail this. -->
|
||||
<jacoco.coverage.target.bundle.method>0.60</jacoco.coverage.target.bundle.method>
|
||||
<jacoco.coverage.target.class.method>0.25</jacoco.coverage.target.class.method>
|
||||
<jacoco.coverage.target.bundle.method>0.70</jacoco.coverage.target.bundle.method>
|
||||
<jacoco.coverage.target.class.method>0.50</jacoco.coverage.target.class.method>
|
||||
<!-- For non-ci builds we'd like the build to still complete if jacoco metrics aren't met. -->
|
||||
<jacoco.haltOnFailure>false</jacoco.haltOnFailure>
|
||||
<jjwt.suite.version>0.11.2</jjwt.suite.version>
|
||||
@@ -153,59 +153,39 @@
|
||||
<!-- Sample only -->
|
||||
<exclude>org.kohsuke.github.example.*</exclude>
|
||||
|
||||
<!-- No methods -->
|
||||
<exclude>org.kohsuke.github.internal.Previews</exclude>
|
||||
|
||||
<!-- Deprecated -->
|
||||
<exclude>org.kohsuke.github.extras.OkHttp3Connector</exclude>
|
||||
<exclude>org.kohsuke.github.EnforcementLevel</exclude>
|
||||
<exclude>org.kohsuke.github.GHPerson.1</exclude>
|
||||
|
||||
<!-- These fail coverage on windows because tests are disabled -->
|
||||
<exclude>org.kohsuke.github.GHAsset</exclude>
|
||||
<exclude>org.kohsuke.github.GHReleaseBuilder</exclude>
|
||||
<exclude>org.kohsuke.github.GHRelease</exclude>
|
||||
<!-- TODO: Some coverage, but more needed -->
|
||||
<exclude>org.kohsuke.github.GHPullRequestReviewBuilder.DraftReviewComment</exclude>
|
||||
<exclude>org.kohsuke.github.GHIssue.PullRequest</exclude>
|
||||
<exclude>org.kohsuke.github.GHCommitSearchBuilder</exclude>
|
||||
<exclude>org.kohsuke.github.GHRepositorySearchBuilder</exclude>
|
||||
<exclude>org.kohsuke.github.GHUserSearchBuilder</exclude>
|
||||
|
||||
<!-- TODO: These still need test coverage -->
|
||||
<exclude>org.kohsuke.github.GHBranchProtection.RequiredSignatures</exclude>
|
||||
<exclude>org.kohsuke.github.GHBranchProtectionBuilder.Restrictions</exclude>
|
||||
<exclude>org.kohsuke.github.GHBranchProtection.Restrictions</exclude>
|
||||
<exclude>org.kohsuke.github.GHCommentAuthorAssociation</exclude>
|
||||
<exclude>org.kohsuke.github.GHCommitBuilder.UserInfo</exclude>
|
||||
<exclude>org.kohsuke.github.GHCommitState</exclude>
|
||||
<exclude>org.kohsuke.github.GHCompare.Commit</exclude>
|
||||
<exclude>org.kohsuke.github.GHCompare.InnerCommit</exclude>
|
||||
<exclude>org.kohsuke.github.GHCompare.Status</exclude>
|
||||
<exclude>org.kohsuke.github.GHCompare.Tree</exclude>
|
||||
<exclude>org.kohsuke.github.GHCompare.User</exclude>
|
||||
<exclude>org.kohsuke.github.GHCompare</exclude>
|
||||
<exclude>org.kohsuke.github.GHDeployKey</exclude>
|
||||
<exclude>org.kohsuke.github.GHDeploymentStatusBuilder</exclude>
|
||||
<exclude>org.kohsuke.github.GHDirection</exclude>
|
||||
<exclude>org.kohsuke.github.GHEmail</exclude>
|
||||
<exclude>org.kohsuke.github.GHEventPayload.Ping</exclude>
|
||||
<exclude>org.kohsuke.github.GHEventPayload.Release</exclude>
|
||||
<exclude>org.kohsuke.github.GHException</exclude>
|
||||
<exclude>org.kohsuke.github.GHHook</exclude>
|
||||
<exclude>org.kohsuke.github.GHHooks.OrgContext</exclude>
|
||||
<exclude>org.kohsuke.github.GHInvitation</exclude>
|
||||
<exclude>org.kohsuke.github.GHMilestoneState</exclude>
|
||||
<exclude>org.kohsuke.github.GHOrgHook</exclude>
|
||||
<exclude>org.kohsuke.github.GHProject.ProjectStateFilter</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.Authorship</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.Commit</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.CommitPointer</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.Tree</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestCommitDetail</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestFileDetail</exclude>
|
||||
<exclude>org.kohsuke.github.GHPullRequestQueryBuilder.Sort</exclude>
|
||||
<exclude>org.kohsuke.github.GHReleaseUpdater</exclude>
|
||||
<exclude>org.kohsuke.github.GHRepository.ForkSort</exclude>
|
||||
<exclude>org.kohsuke.github.GHRequestedAction</exclude>
|
||||
<exclude>org.kohsuke.github.GHStargazer</exclude>
|
||||
<exclude>org.kohsuke.github.GHTagObject</exclude>
|
||||
<exclude>org.kohsuke.github.GHTeam.Role</exclude>
|
||||
<exclude>org.kohsuke.github.GHUserSearchBuilder.Sort</exclude>
|
||||
<exclude>org.kohsuke.github.GHVerifiedKey</exclude>
|
||||
</excludes>
|
||||
</rule>
|
||||
@@ -592,6 +572,8 @@
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<!-- Only fail code coverage on non-windows machines -->
|
||||
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
|
||||
<spotless-maven-plugin.goal>check</spotless-maven-plugin.goal>
|
||||
</properties>
|
||||
</profile>
|
||||
@@ -602,9 +584,6 @@
|
||||
<name>enable-ci</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
Reference in New Issue
Block a user