File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 31
31
uses : gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
32
32
with :
33
33
arguments : build
34
+ - name : Upload coverage to Codecov
35
+ uses : codecov/codecov-action@v2
36
+ with :
37
+ directory : lib/build
38
+ flags : unittests # optional
39
+ name : coverage # optional
40
+ fail_ci_if_error : true # optional (default = false)
41
+ verbose : true # optional (default = false)
34
42
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
35
43
# the publishing section of your build.gradle
36
44
- name : Publish to Sonatype (Maven)
Original file line number Diff line number Diff line change 30
30
- name : Build with Gradle
31
31
uses : gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
32
32
with :
33
- arguments : build
33
+ arguments : build
34
+ - name : Upload coverage to Codecov
35
+ uses : codecov/codecov-action@v2
36
+ with :
37
+ directory : lib/build
38
+ flags : unittests # optional
39
+ name : pr coverage # optional
40
+ fail_ci_if_error : true # optional (default = false)
41
+ verbose : true # optional (default = false)
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ plugins {
13
13
id ' pmd'
14
14
id ' maven-publish'
15
15
id ' signing'
16
+ id ' jacoco'
16
17
}
17
18
18
19
pmd {
@@ -44,6 +45,16 @@ tasks.named('test') {
44
45
useJUnitPlatform()
45
46
}
46
47
48
+ test {
49
+ finalizedBy jacocoTestReport // report is always generated after tests run
50
+ }
51
+ jacocoTestReport {
52
+ dependsOn test // tests are required to run before generating the report
53
+ reports {
54
+ xml. required = true
55
+ }
56
+ }
57
+
47
58
task sourcesJar (type : Jar , dependsOn : classes) {
48
59
archiveClassifier = ' sources'
49
60
archiveBaseName = ' openfeature'
@@ -54,7 +65,6 @@ artifacts {
54
65
archives sourcesJar
55
66
}
56
67
57
-
58
68
jar. archiveBaseName = ' openfeature'
59
69
60
70
def repo_url = System . getenv(" REPOSITORY_URL" )
You can’t perform that action at this time.
0 commit comments