Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jacoco test coverage #48

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ jobs:
java-version: '17'
distribution: 'temurin'
- run: chmod +x gradlew
- run: ./gradlew test
- run: ./gradlew test jacocoTestReport
env:
RINGCENTRAL_SERVER_URL: ${{ secrets.RINGCENTRAL_SERVER_URL }}
RINGCENTRAL_CLIENT_ID: ${{ secrets.RINGCENTRAL_CLIENT_ID }}
RINGCENTRAL_CLIENT_SECRET: ${{ secrets.RINGCENTRAL_CLIENT_SECRET }}
RINGCENTRAL_JWT_TOKEN: ${{ secrets.RINGCENTRAL_JWT_TOKEN }}
RINGCENTRAL_SENDER: ${{ secrets.RINGCENTRAL_SENDER }}
RINGCENTRAL_RECEIVER: ${{ secrets.RINGCENTRAL_RECEIVER }}
- name: View Report
uses: actions/upload-artifact@v4
with:
name: jacoco-reports
path: build/jacocoHtml/
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'maven-publish'
id 'java-library'
id 'signing'
id 'jacoco'
}

group 'com.ringcentral'
Expand All @@ -13,6 +14,17 @@ sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jacoco {
toolVersion = "0.8.11"
}

jacocoTestReport {
reports {
xml.enabled true
html.enabled true
html.destination file("${buildDir}/jacocoHtml")
}
}

dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
Expand Down Expand Up @@ -88,4 +100,5 @@ test {
testLogging {
exceptionFormat = 'full'
}
finalizedBy jacocoTestReport
}