From 2a89d26c7144391c115bd06fcf25c2026e783b95 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 26 Sep 2024 19:39:50 +0200 Subject: [PATCH] [github ci] Use overallsapp/github-action@v2 to report coverage stats --- .github/workflows/ci.yml | 20 ++++++++------------ smack-java11-full/build.gradle | 4 ++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f021e6a015..8d0ce14c95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,20 +72,16 @@ jobs: run: ./gradlew javadocAll --stacktrace # Test Coverage Report - - name: Jacoco Test Coverage - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - if: | - ${{ matrix.java == env.PRIMARY_JAVA_VERSION }} && - ${{ env.COVERALLS_REPO_TOKEN != '' }} + - name: Aggregated Jacoco Test Coverage Report run: | - if [[ -z ${COVERALLS_REPO_TOKEN} ]]; then - echo WARNING: COVERALLS_REPO_TOKEN is empty - else - echo COVERALLS_REPO_TOKEN is not empty - fi ./gradlew smack-java11-full:testCodeCoverageReport - ./gradlew smack-java11-full:coveralls + + # Coveralls + - name: Report coverage stats to Coveralls + uses: coverallsapp/github-action@v2 + with: + format: jacoco + file: smack-java11-full/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml # Upload build artifacts - name: Upload build artifacts diff --git a/smack-java11-full/build.gradle b/smack-java11-full/build.gradle index 4f4bf0652f..8b806acc8a 100644 --- a/smack-java11-full/build.gradle +++ b/smack-java11-full/build.gradle @@ -25,6 +25,10 @@ dependencies { testImplementation "org.reflections:reflections:${orgReflectionsVersion}" } +coveralls { + jacocoReportPath 'build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml' +} + task printModularXmppClientToServerConnectionStateGraph(type: JavaExec) { classpath sourceSets.main.runtimeClasspath main 'org.jivesoftware.smack.full.ModularXmppClientToServerConnectionTool'