Skip to content

Commit 4c0e493

Browse files
authored
Bump jacoco and simplify code coverage CI (#2963)
1 parent e8da68b commit 4c0e493

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ jobs:
2525
- name: Set up Gradle
2626
uses: gradle/actions/setup-gradle@ac396bf1a80af16236baf54bd7330ae21dc6ece5 # v6
2727

28-
- name: Run Tests
29-
run: ./gradlew test -x spotlessCheck -x spotlessApply -Pjacoco -PtestJavaVersion=23
30-
continue-on-error: true
31-
32-
- name: Run Test Coverage
33-
run: ./gradlew testCodeCoverageReport -Pjacoco
34-
35-
- name: Publish Coverage
28+
- name: Run and Publish Test Coverage
3629
env:
3730
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
38-
run: ./gradlew coverallsJacoco -Pjacoco
31+
run: ./gradlew coverallsJacoco -x spotlessCheck -x spotlessApply -Pjacoco -PtestJavaVersion=23

gradle/jacoco.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
apply plugin: 'jacoco-report-aggregation'
44
apply plugin: 'com.github.nbaztec.coveralls-jacoco'
55

6+
def jacocoToolVersion = "0.8.15"
7+
8+
jacoco {
9+
toolVersion = jacocoToolVersion
10+
}
11+
612
dependencies {
713
jacocoAggregation project(':temporal-kotlin')
814
jacocoAggregation project(':temporal-opentracing')
@@ -39,7 +45,11 @@ testCodeCoverageReport {
3945
}
4046

4147
getClassDirectories().setFrom(files(
42-
jacocoSubprojects.collect {it.fileTree(dir: "${it.buildDir}/classes", exclude: jacocoExclusions)}
48+
jacocoSubprojects.collect {
49+
it.sourceSets.main.output.classesDirs.asFileTree.matching {
50+
exclude jacocoExclusions
51+
}
52+
}
4353
))
4454
}
4555

@@ -57,7 +67,7 @@ subprojects {
5767
apply plugin: 'jacoco'
5868

5969
jacoco {
60-
toolVersion = "0.8.9"
70+
toolVersion = jacocoToolVersion
6171
}
6272

6373
jacocoTestReport {

0 commit comments

Comments
 (0)