Add SonarCloud checks

This commit is contained in:
Kirill Kamakin
2022-05-28 10:26:34 +02:00
parent 53904ff42e
commit 3366382ac3
2 changed files with 20 additions and 1 deletions

View File

@@ -18,8 +18,18 @@ jobs:
java-version: '17' java-version: '17'
cache: 'gradle' cache: 'gradle'
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run tests - name: Run tests
run: ./gradlew check --no-daemon env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew check sonarqube --no-daemon
- name: Publish test reports - name: Publish test reports
uses: mikepenz/action-junit-report@v2 uses: mikepenz/action-junit-report@v2

View File

@@ -8,6 +8,7 @@ plugins {
id 'com.google.gms.google-services' id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics' id 'com.google.firebase.crashlytics'
id 'com.google.firebase.firebase-perf' id 'com.google.firebase.firebase-perf'
id "org.sonarqube" version "3.3"
} }
android { android {
@@ -220,3 +221,11 @@ dependencies {
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1" debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
} }
sonarqube {
properties {
property "sonar.projectKey", "kirmanak_Mealient"
property "sonar.organization", "kirmanak"
property "sonar.host.url", "https://sonarcloud.io"
}
}