File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 25
25
- name : Build Lesson 15 with Java
26
26
working-directory : ./lesson_15/tdd
27
27
run : ./gradlew check
28
+
29
+ - name : Add coverage to PR
30
+ id : jacoco
31
+
32
+ with :
33
+ paths : ./lesson_15/tdd/tdd_app/build/reports/jacoco/test/jacocoTestReport.xml
34
+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
2
2
// Apply the application plugin to add support for building a CLI application in Java.
3
3
application
4
4
eclipse
5
+ jacoco
5
6
id(" com.diffplug.spotless" ) version " 6.25.0"
6
7
id(" org.springframework.boot" ) version " 3.2.2"
7
8
id(" com.adarshr.test-logger" ) version " 4.0.0"
@@ -38,6 +39,14 @@ application {
38
39
tasks.named<Test >(" test" ) {
39
40
// Use JUnit Platform for unit tests.
40
41
useJUnitPlatform()
42
+ finalizedBy(tasks.jacocoTestReport)
43
+ }
44
+
45
+ tasks.jacocoTestReport {
46
+ dependsOn(tasks.test)
47
+ reports {
48
+ xml.required = true
49
+ }
41
50
}
42
51
43
52
You can’t perform that action at this time.
0 commit comments