Skip to content

Commit c87d5ee

Browse files
committed
Replaced Github integrated action with Gradle task for Sonarqube
1 parent 5f62285 commit c87d5ee

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
java-version: 1.8
1616
- name: Run unit tests and coverage generation
1717
run: ./gradlew jacocoTestReport
18+
- name: SonarCloud static code analysis
19+
run: ./gradlew sonar
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1823
- name: Run instrumentation tests
1924
uses: reactivecircus/android-emulator-runner@v2
2025
with:
@@ -24,9 +29,4 @@ jobs:
2429
avd-name: test
2530
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
2631
disable-animations: true
27-
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest connectedPlayDebugAndroidTest connectedFossDebugAndroidTest
28-
- name: SonarCloud static code analysis
29-
uses: sonarsource/sonarcloud-github-action@master
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32+
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest connectedPlayDebugAndroidTest connectedFossDebugAndroidTest

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ sonarqube {
4747
properties {
4848
property "sonar.projectName", "Omni Notes"
4949
property "sonar.projectKey", "omni-notes"
50+
property "sonar.organisation", "federicoiosue-github"
5051
property 'sonar.projectVersion', project.VERSION_NAME
5152
property "sonar.host.url", "https://sonarcloud.io"
5253
property 'sonar.sourceEncoding', 'UTF-8'

0 commit comments

Comments
 (0)