Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
path: |
**/build/test-results/**/*.xml
test-report-aggregation/build/reports/tests/test/aggregated-results/**
test-report-aggregation/build/reports/jacoco/testCodeCoverageReport/**
retention-days: 7

docs:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test-reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ jobs:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish JaCoCo report as PR comment
id: jacoco
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848 # 1.7.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
paths: build-reports-artifacts/**/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
update-comment: true
title: "# :java_duke: JaCoCo coverage report"
min-coverage-overall: 50
min-coverage-changed-files: 60
comment-type: both
pr-number: ${{ needs.get-pr-info.outputs.pr_number}}
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'

- name: Publish JUnit test report (PR comment with collapsed failures)
uses: mikepenz/action-junit-report@e08919a3b1fb83a78393dfb775a9c37f17d8eea6 # v6.0.1
env:
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/docling-java-shared.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("docling-shared")
`java-library`
`jacoco`
}

repositories {
Expand Down Expand Up @@ -36,10 +37,16 @@ testing {
}
}

jacoco {
toolVersion = libs.findVersion("jacoco").get().toString()
}

tasks.withType<Test> {
// Use JUnit Platform for unit tests.
useJUnitPlatform()

finalizedBy(tasks.named("jacocoTestReport"))

testLogging {
events("PASSED", "FAILED", "SKIPPED", "STANDARD_OUT", "STANDARD_ERROR")
showStandardStreams = true
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
assertj = "3.27.6"
jackson2 = "2.20.1"
jackson3 = "3.0.3"
jacoco = "0.8.14"
jreleaser = "1.20.0"
jspecify = "1.0.0"
junit = "6.0.1"
Expand Down
13 changes: 12 additions & 1 deletion test-report-aggregation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ plugins {
id("docling-shared")
`java-library`
`test-report-aggregation`
`jacoco-report-aggregation`
}

repositories {
mavenCentral()
}

dependencies {
testReportAggregation(project(":docling-core"))
testReportAggregation(project(":docling-serve-api"))
testReportAggregation(project(":docling-serve-client"))
testReportAggregation(project(":docling-testcontainers"))
testReportAggregation(project(":docling-version-tests"))

jacocoAggregation(project(":docling-core"))
jacocoAggregation(project(":docling-serve-api"))
jacocoAggregation(project(":docling-serve-client"))
jacocoAggregation(project(":docling-testcontainers"))
jacocoAggregation(project(":docling-version-tests"))

api(platform(libs.testcontainers.bom))
api(platform(libs.jackson.bom))

Expand All @@ -24,5 +32,8 @@ dependencies {
}

tasks.named("check") {
dependsOn(tasks.named<TestReport>("testAggregateTestReport"))
dependsOn(
tasks.named<TestReport>("testAggregateTestReport"),
tasks.named<JacocoReport>("testCodeCoverageReport")
)
}