Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 6 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
code-coverage:
if: github.event_name == 'push' || github.head_ref == 'fix-temporal-sdk-java-main-code-coverage'
Comment thread
dplyukhin marked this conversation as resolved.
Outdated
runs-on: ubuntu-latest-16-cores
steps:
- name: Checkout
Expand All @@ -25,14 +29,7 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ac396bf1a80af16236baf54bd7330ae21dc6ece5 # v6

- name: Run Tests
run: ./gradlew test -x spotlessCheck -x spotlessApply -Pjacoco -PtestJavaVersion=23
continue-on-error: true

- name: Run Test Coverage
run: ./gradlew testCodeCoverageReport -Pjacoco

- name: Publish Coverage
- name: Run and Publish Test Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: ./gradlew coverallsJacoco -Pjacoco
run: ./gradlew coverallsJacoco -x spotlessCheck -x spotlessApply -Pjacoco -PtestJavaVersion=23
14 changes: 12 additions & 2 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
apply plugin: 'jacoco-report-aggregation'
apply plugin: 'com.github.nbaztec.coveralls-jacoco'

def jacocoToolVersion = "0.8.15"

jacoco {
toolVersion = jacocoToolVersion
}

dependencies {
jacocoAggregation project(':temporal-kotlin')
jacocoAggregation project(':temporal-opentracing')
Expand Down Expand Up @@ -39,7 +45,11 @@ testCodeCoverageReport {
}

getClassDirectories().setFrom(files(
jacocoSubprojects.collect {it.fileTree(dir: "${it.buildDir}/classes", exclude: jacocoExclusions)}
jacocoSubprojects.collect {
it.sourceSets.main.output.classesDirs.asFileTree.matching {
exclude jacocoExclusions
}
}
))
}

Expand All @@ -57,7 +67,7 @@ subprojects {
apply plugin: 'jacoco'

jacoco {
toolVersion = "0.8.9"
toolVersion = jacocoToolVersion
}

jacocoTestReport {
Expand Down
Loading