From 8a0367e96b9b919d9f182ca179a275a989ea2759 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Mon, 15 Apr 2024 09:09:48 +0530 Subject: [PATCH 01/15] Test coverage --- .github/workflows/test.yml | 4 ++-- build.gradle | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1df9520e..2471d912 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: push: - branches: [ master ] + branches: [ master,jacocoTestCoverage ] pull_request: branches: [ master ] @@ -26,7 +26,7 @@ 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 }} diff --git a/build.gradle b/build.gradle index e0e65bc4..eee44114 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'maven-publish' id 'java-library' id 'signing' + id 'jacoco' } group 'com.ringcentral' @@ -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' @@ -67,8 +79,8 @@ publishing { maven { url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" credentials { - username = ossrhUsername - password = ossrhPassword + username = 'ossrhUsername' + password = 'ossrhPassword' } } } From 7867fc7352b9a48aff1c2497edd107a8b218d888 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Mon, 15 Apr 2024 09:44:43 +0530 Subject: [PATCH 02/15] add report --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index eee44114..0bbbba7c 100644 --- a/build.gradle +++ b/build.gradle @@ -100,4 +100,5 @@ test { testLogging { exceptionFormat = 'full' } + finalizedBy jacocoTestReport } From 007c73b3e2ec6c243d9c8e54a37f3ae8c61ceefa Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Mon, 15 Apr 2024 09:59:13 +0530 Subject: [PATCH 03/15] Add artificat for jacoco report --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2471d912..e2c28646 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,3 +34,8 @@ jobs: RINGCENTRAL_JWT_TOKEN: ${{ secrets.RINGCENTRAL_JWT_TOKEN }} RINGCENTRAL_SENDER: ${{ secrets.RINGCENTRAL_SENDER }} RINGCENTRAL_RECEIVER: ${{ secrets.RINGCENTRAL_RECEIVER }} + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: jacoco-reports + path: build/reports/jacoco/test/html From 5499ae1ec6e0356e9a5db6161db2e5937a2530ea Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Mon, 15 Apr 2024 18:13:16 +0530 Subject: [PATCH 04/15] update report file --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2c28646..d664928f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,4 +38,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: jacoco-reports - path: build/reports/jacoco/test/html + path: build/reports/jacocoHtml/index.html From 9d08880010e731ee6c248c3eee2ace4d3aab9014 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Mon, 15 Apr 2024 18:28:40 +0530 Subject: [PATCH 05/15] Update gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index f0659016..712cebc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .gradle/ -build/ .idea/ out/ From 24c3fc95334a98e1126351ceaba163d3683a6859 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 08:09:47 +0530 Subject: [PATCH 06/15] Update path reference --- .github/workflows/test.yml | 4 ++-- .gitignore | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d664928f..a57a70a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: RINGCENTRAL_SENDER: ${{ secrets.RINGCENTRAL_SENDER }} RINGCENTRAL_RECEIVER: ${{ secrets.RINGCENTRAL_RECEIVER }} - name: Archive artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: jacoco-reports - path: build/reports/jacocoHtml/index.html + path: build/jacocoHtml/index.html diff --git a/.gitignore b/.gitignore index 712cebc0..61ad708b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .gradle/ + .idea/ out/ From 3ddba894a46ce8c0c9a64681219058dc24b34fa5 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 08:13:30 +0530 Subject: [PATCH 07/15] Update Gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 61ad708b..f0659016 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .gradle/ - +build/ .idea/ out/ From 1bac28a0cf267e231c4f81173dbe2524fdb9d2ef Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 08:19:01 +0530 Subject: [PATCH 08/15] Add download artifact --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a57a70a6..9aed1075 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,3 +39,8 @@ jobs: with: name: jacoco-reports path: build/jacocoHtml/index.html + - name: View Reports + uses: actions/download-artifact@v4 + with: + name: jacoco-reports + path: build/jacocoHtml/index.html From 416438c697c3be9ac64024bb075c817d83e0a852 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 08:24:44 +0530 Subject: [PATCH 09/15] Update download artifact --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9aed1075..a78332ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: name: jacoco-reports path: build/jacocoHtml/index.html - name: View Reports - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 with: name: jacoco-reports path: build/jacocoHtml/index.html From 371fda276a9451159085b6332ceef3f51b8fbe8a Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 08:35:43 +0530 Subject: [PATCH 10/15] Update download artifact --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a78332ae..1c3d6dd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,9 +38,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: jacoco-reports - path: build/jacocoHtml/index.html + path: build/jacocoHtml/ - name: View Reports uses: actions/download-artifact@v2 with: name: jacoco-reports - path: build/jacocoHtml/index.html + path: build/jacocoHtml/ From eb4e7ae6c211fcda615f327492fcd9cb0150ccd0 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 09:09:25 +0530 Subject: [PATCH 11/15] Update download artifact --- .github/workflows/test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c3d6dd7..c726fe8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,4 @@ jobs: name: jacoco-reports path: build/jacocoHtml/ - name: View Reports - uses: actions/download-artifact@v2 - with: - name: jacoco-reports - path: build/jacocoHtml/ + uses: actions/download-artifact@v3 From 020b000ae2c2651d27d428c486f5cac9d3a1c1b8 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 09:15:39 +0530 Subject: [PATCH 12/15] Remove download artifact --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c726fe8b..5045324c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,5 +39,3 @@ jobs: with: name: jacoco-reports path: build/jacocoHtml/ - - name: View Reports - uses: actions/download-artifact@v3 From 8d64454e162d819c38d6b298c5e6b44eb66c34b9 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 10:20:13 +0530 Subject: [PATCH 13/15] View Reports --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5045324c..bd34009a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: RINGCENTRAL_JWT_TOKEN: ${{ secrets.RINGCENTRAL_JWT_TOKEN }} RINGCENTRAL_SENDER: ${{ secrets.RINGCENTRAL_SENDER }} RINGCENTRAL_RECEIVER: ${{ secrets.RINGCENTRAL_RECEIVER }} - - name: Archive artifacts + - name: View Report uses: actions/upload-artifact@v4 with: name: jacoco-reports From b07697fdca7895e3ba7fbfe48c9a4b1e9a34ce10 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 11:34:34 +0530 Subject: [PATCH 14/15] Remove branch --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd34009a..9fc36af2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: push: - branches: [ master,jacocoTestCoverage ] + branches: [ master ] pull_request: branches: [ master ] From fbc44259ba71d2082fca178e2d3d47d256ee0d5c Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Tue, 16 Apr 2024 11:40:19 +0530 Subject: [PATCH 15/15] remove quotes from build gradle --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0bbbba7c..e7d5a866 100644 --- a/build.gradle +++ b/build.gradle @@ -79,8 +79,8 @@ publishing { maven { url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" credentials { - username = 'ossrhUsername' - password = 'ossrhPassword' + username = ossrhUsername + password = ossrhPassword } } }