File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 4848 if : success() || failure() # always run even if the previous step fails
4949 with :
5050 report_paths : ' **/build/test-results/jvmTest/TEST-*.xml'
51+ - name : Publish code coverage report as PR comment
52+ uses : madrapps/jacoco-report@v1.6.1
53+ with :
54+ paths : ' **/build/reports/jacoco/test/jacocoTestReport.xml'
55+ token : ${{ secrets.GITHUB_TOKEN }}
56+ min-coverage-overall : $MIN_COVERAGE_OVERALL
57+ min-coverage-changed-files : $MIN_COVERAGE_CHANGED_FILES
58+ title : Code Coverage
5159# - name: Publish code coverage report as PR comment
5260# id: jacoco
5361# uses: madrapps/jacoco-report@v1.6.1
Original file line number Diff line number Diff line change @@ -216,6 +216,20 @@ fun Task.configureCleanAndTestTasks() {
216216}
217217tasks.register(" cleanAndTestAll" ) { configureCleanAndTestTasks() }
218218
219+ // Helper, run as `gradle jacocoTestReport`
220+ fun Task.configureCodeCoverageTasks () {
221+ allModules.forEach {
222+ when (it.value.first) {
223+ CleanAndTest .KOTLIN -> {
224+ println (" Generate code coverage for ${it.key} " )
225+ dependsOn(" :${it.key} :jacocoTestReport" )
226+ }
227+ else -> {}
228+ }
229+ }
230+ }
231+ tasks.register(" jacocoTestReport" ) { configureCodeCoverageTasks() }
232+
219233// Helper, run as `gradle publishToLocal`
220234fun Task.publishToLocal () {
221235 allModules.forEach {
You can’t perform that action at this time.
0 commit comments