Merge pull request #47 from kirmanak/sonarcloud

Add SonarCloud checks
This commit is contained in:
Kirill Kamakin
2022-05-28 10:40:31 +02:00
committed by GitHub
2 changed files with 22 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
@@ -18,8 +20,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

View File

@@ -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"
}
}