Skip to content

Commit

Permalink
[github ci] Use overallsapp/github-action@v2 to report coverage stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Sep 26, 2024
1 parent b0f0ee2 commit 2a89d26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions smack-java11-full/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 2a89d26

Please sign in to comment.