From b32e9232ed67edb85aed903881e466d9675cdc7d Mon Sep 17 00:00:00 2001 From: olewandowski1 Date: Wed, 8 Nov 2023 10:26:52 +0100 Subject: [PATCH] CQI-10: add test coverage --- .github/workflows/sonar-analysis.yml | 7 +++++++ build.gradle | 2 ++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/sonar-analysis.yml b/.github/workflows/sonar-analysis.yml index 882a702..afe1ca3 100644 --- a/.github/workflows/sonar-analysis.yml +++ b/.github/workflows/sonar-analysis.yml @@ -30,6 +30,13 @@ jobs: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle + - name: Build with Docker Compose + run: | + curl -o .env -L https://raw.githubusercontent.com/OpenLMIS/openlmis-ref-distro/master/settings-sample.env + sudo chown -R $(whoami) ./ + docker-compose -f docker-compose.builder.yml run builder + cp ./build/reports/jacoco/test/jacocoTestReport.xml report.xml + rm -rf ./build - name: Analyze env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index 5e71761..9e5dc9e 100644 --- a/build.gradle +++ b/build.gradle @@ -203,6 +203,8 @@ sonarqube { property "sonar.projectKey", "OpenLMIS_openlmis-cce" property "sonar.organization", "openlmis" property "sonar.host.url", "https://sonarcloud.io" + property "sonar.java.source", "17" + property "sonar.coverage.jacoco.xmlReportPaths", "./report.xml" } }