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 2525 - name : Build Lesson 15 with Java
2626 working-directory : ./lesson_15/tdd
2727 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 {
22 // Apply the application plugin to add support for building a CLI application in Java.
33 application
44 eclipse
5+ jacoco
56 id(" com.diffplug.spotless" ) version " 6.25.0"
67 id(" org.springframework.boot" ) version " 3.2.2"
78 id(" com.adarshr.test-logger" ) version " 4.0.0"
@@ -38,6 +39,14 @@ application {
3839tasks.named<Test >(" test" ) {
3940 // Use JUnit Platform for unit tests.
4041 useJUnitPlatform()
42+ finalizedBy(tasks.jacocoTestReport)
43+ }
44+
45+ tasks.jacocoTestReport {
46+ dependsOn(tasks.test)
47+ reports {
48+ xml.required = true
49+ }
4150}
4251
4352
You can’t perform that action at this time.
0 commit comments