Add SonarCloud checks
This commit is contained in:
12
.github/workflows/check.yml
vendored
12
.github/workflows/check.yml
vendored
@@ -18,8 +18,18 @@ jobs:
|
||||
java-version: '17'
|
||||
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
|
||||
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
|
||||
uses: mikepenz/action-junit-report@v2
|
||||
|
||||
@@ -8,6 +8,7 @@ plugins {
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
id 'com.google.firebase.firebase-perf'
|
||||
id "org.sonarqube" version "3.3"
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -219,4 +220,12 @@ dependencies {
|
||||
// https://github.com/square/leakcanary/releases
|
||||
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user