Skip to content

Commit

Permalink
unit tests gradle task integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Manrique committed Oct 26, 2024
1 parent 53f0449 commit db47e8f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
distribution: 'temurin'

- name: Run unit tests
run: ./gradlew test aggregateTestReport
run: ./gradlew unitTests

- name: Upload unit tests report
if: always()
Expand Down
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ plugins {
}

project.afterEvaluate {
tasks.register('unitTests', TestReport) {
description = "Generates a combined test report for all modules"
group = "verification"

subprojects.each { subproject ->
subproject.tasks.withType(Test).forEach { testTask ->
reportOn(testTask.binaryResultsDirectory)
}
}

destinationDirectory = file("$buildDir/reports/tests/aggregate")
}

tasks.register("jacocoCoverageVerification", JacocoCoverageVerification) {
classDirectories = tasks.named("generateJacocoCoverageReport").get().classDirectories
executionData = tasks.named("generateJacocoCoverageReport").get().executionData
Expand Down

0 comments on commit db47e8f

Please sign in to comment.