File tree Expand file tree Collapse file tree 7 files changed +55
-46
lines changed
src/main/java/org/springframework/pulsar/gradle Expand file tree Collapse file tree 7 files changed +55
-46
lines changed Original file line number Diff line number Diff line change @@ -37,24 +37,26 @@ jobs:
37
37
- name : Build and run unit tests
38
38
run : |
39
39
./gradlew clean build -x integrationTest --continue --scan
40
+ - name : Upload Test Results
41
+ if : failure()
42
+ uses : actions/upload-artifact@v3
43
+ with :
44
+ name : test-results
45
+ path : ' */build/reports/tests/**/*.*'
46
+ retention-days : 3
40
47
- name : Create Aggregated Jacoco Report
41
- if : contains(github.event.pull_request.labels.*.name, 'ci/upload-jacoco')
42
48
run : |
43
49
./gradlew aggregateJacocoTestReport --info
50
+ - name : Verify Code Coverage
51
+ run : |
52
+ ./gradlew jacocoTestCoverageVerification --info
44
53
- name : Upload Aggregated Jacoco Report
45
- if : contains(github.event.pull_request.labels.*.name, 'ci/upload-jacoco')
54
+ if : failure() || contains(github.event.pull_request.labels.*.name, 'ci/upload-jacoco')
46
55
uses : actions/upload-artifact@v3
47
56
with :
48
57
name : jacoco-results
49
58
path : ' build/reports/jacoco/**/*.*'
50
59
retention-days : 3
51
- - name : Capture Test Results
52
- if : failure()
53
- uses : actions/upload-artifact@v3
54
- with :
55
- name : test-results
56
- path : ' */build/reports/tests/**/*.*'
57
- retention-days : 3
58
60
integration_tests :
59
61
needs : [prerequisites, build_and_verify]
60
62
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ plugins {
9
9
10
10
description = ' Spring for Apache Pulsar'
11
11
12
+ apply from : ' gradle/jacoco-conventions.gradle'
12
13
apply from : ' gradle/aggregate-jacoco-report.gradle'
13
14
apply from : ' gradle/update-copyrights.gradle'
14
15
apply from : ' gradle/version-catalog-update.gradle'
Original file line number Diff line number Diff line change @@ -59,10 +59,6 @@ gradlePlugin {
59
59
id = " io.spring.convention.artfiactory"
60
60
implementationClass = " io.spring.gradle.convention.ArtifactoryPlugin"
61
61
}
62
- jacocoConventionsPlugin {
63
- id = " org.springframework.pulsar.jacoco"
64
- implementationClass = " org.springframework.pulsar.gradle.check.JacocoConventionsPlugin"
65
- }
66
62
optionalDependenciesPlugin {
67
63
id = " org.springframework.pulsar.optional-dependencies"
68
64
implementationClass = " org.springframework.pulsar.gradle.optional.OptionalDependenciesPlugin"
Original file line number Diff line number Diff line change 19
19
import org .gradle .api .Project ;
20
20
import org .gradle .api .plugins .PluginManager ;
21
21
22
- import org .springframework .pulsar .gradle .check .JacocoConventionsPlugin ;
23
22
import org .springframework .pulsar .gradle .publish .PublishAllJavaComponentsPlugin ;
24
23
import org .springframework .pulsar .gradle .publish .SpringMavenPlugin ;
25
24
@@ -33,6 +32,5 @@ protected void additionalPlugins(Project project) {
33
32
PluginManager pluginManager = project .getPluginManager ();
34
33
pluginManager .apply (SpringMavenPlugin .class );
35
34
pluginManager .apply (PublishAllJavaComponentsPlugin .class );
36
- pluginManager .apply (JacocoConventionsPlugin .class );
37
35
}
38
36
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ def javaProjects = [ ' spring-pulsar' ,
2
+ ' spring-pulsar-cache-provider' ,
3
+ ' spring-pulsar-cache-provider-caffeine' ,
4
+ ' spring-pulsar-reactive' ,
5
+ ' spring-pulsar-test' ]
6
+
7
+
8
+ allprojects {
9
+ if (! javaProjects. contains(project. name)) {
10
+ return
11
+ }
12
+
13
+ apply plugin : ' jacoco'
14
+
15
+ jacoco {
16
+ toolVersion libs. versions. jacoco. get()
17
+ }
18
+
19
+ project. tasks. withType(Test , (test) ->
20
+ project. tasks. withType(JacocoReport , test ::finalizedBy))
21
+
22
+ tasks. withType(JacocoCoverageVerification ) {
23
+ violationRules {
24
+ rule {
25
+ limit {
26
+ minimum = 0.5
27
+ }
28
+ }
29
+ rule {
30
+ enabled = false
31
+ element = ' CLASS'
32
+ includes = [' org.gradle.*' ]
33
+
34
+ limit {
35
+ counter = ' LINE'
36
+ value = ' TOTALCOUNT'
37
+ maximum = 0.3
38
+ }
39
+ }
40
+ }
41
+
42
+ }
43
+ }
You can’t perform that action at this time.
0 commit comments