From 241ae3f39327a2fbec0a1a5754a60ccdaf64f78d Mon Sep 17 00:00:00 2001 From: BAStos525 Date: Tue, 15 Oct 2024 13:28:24 +0300 Subject: [PATCH] try suggestion 8 Signed-off-by: BAStos525 --- .github/workflows/iroha2-pr.yml | 2 +- build.gradle | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/iroha2-pr.yml b/.github/workflows/iroha2-pr.yml index c123e4ba..fc108294 100644 --- a/.github/workflows/iroha2-pr.yml +++ b/.github/workflows/iroha2-pr.yml @@ -27,7 +27,7 @@ jobs: ${{ runner.os }}-gradle- - name: Build with Gradle run: | - ./gradlew clean build test -Dsonar.token=${{ secrets.SONAR_TOKEN }} sonar + ./gradlew build testCoverage sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }} - name: Upload build reports if: failure() uses: actions/upload-artifact@v3 diff --git a/build.gradle b/build.gradle index 912b7ab3..4ccb42cb 100644 --- a/build.gradle +++ b/build.gradle @@ -100,9 +100,6 @@ subprojects { // it is disabled by default to publish original version by CI, not a fat jar tasks.shadowJar.enabled = false - // tasks.named('testCoverage') { - // dependsOn ":${name}:processTestResources" - // } } task allShadowJars { @@ -137,12 +134,15 @@ test { dependsOn testCoverage } +plugins.withType(JacocoPlugin) { + tasks["test"].finalizedBy 'testCoverage' +} + sonar { properties { property "sonar.projectKey", "hyperledger:iroha-java" property "sonar.host.url", "https://sonar.katana.soramitsu.co.jp" property "sonar.java.coveragePlugin", "jacoco" - property 'sonar.junit.reportPaths', 'build/test-results/test' } }