From c87d5ee73df86b61d0603d959d847a54629286f4 Mon Sep 17 00:00:00 2001 From: Federico Iosue Date: Wed, 5 Aug 2020 11:58:26 +0200 Subject: [PATCH] Replaced Github integrated action with Gradle task for Sonarqube --- .github/workflows/main.yml | 12 ++++++------ build.gradle | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 884f55cd1f..a27de4ec65 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,11 @@ jobs: java-version: 1.8 - name: Run unit tests and coverage generation run: ./gradlew jacocoTestReport + - name: SonarCloud static code analysis + run: ./gradlew sonar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Run instrumentation tests uses: reactivecircus/android-emulator-runner@v2 with: @@ -24,9 +29,4 @@ jobs: avd-name: test emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim disable-animations: true - script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest connectedPlayDebugAndroidTest connectedFossDebugAndroidTest - - name: SonarCloud static code analysis - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest connectedPlayDebugAndroidTest connectedFossDebugAndroidTest \ No newline at end of file diff --git a/build.gradle b/build.gradle index df66f9d28b..67dc6e9a42 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,7 @@ sonarqube { properties { property "sonar.projectName", "Omni Notes" property "sonar.projectKey", "omni-notes" + property "sonar.organisation", "federicoiosue-github" property 'sonar.projectVersion', project.VERSION_NAME property "sonar.host.url", "https://sonarcloud.io" property 'sonar.sourceEncoding', 'UTF-8'