mirror of
https://github.com/grimsi/gameyfin.git
synced 2026-02-06 11:27:07 +00:00
Update Sonar CI action
This commit is contained in:
parent
b4c9fa3336
commit
13527767bc
4
.github/workflows/sonar.yml
vendored
4
.github/workflows/sonar.yml
vendored
@ -35,10 +35,10 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- name: Run tests and generate JaCoCo report
|
||||
run: ./gradlew test jacocoTestReport
|
||||
run: ./gradlew :app:test :app:jacocoTestReport
|
||||
|
||||
- name: SonarCloud Scan
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: ./gradlew sonar
|
||||
run: ./gradlew :app:sonar
|
||||
|
||||
@ -110,20 +110,23 @@ tasks.withType<Test> {
|
||||
}
|
||||
|
||||
tasks.jacocoTestReport {
|
||||
dependsOn(tasks.test)
|
||||
reports {
|
||||
xml.required = true
|
||||
xml.outputLocation = layout.buildDirectory.file("reports/jacoco/test/jacocoTestReport.xml")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("sonar") {
|
||||
dependsOn(tasks.jacocoTestReport)
|
||||
}
|
||||
|
||||
sonar {
|
||||
properties {
|
||||
property("sonar.projectKey", "gameyfin")
|
||||
property("sonar.organization", "gameyfin")
|
||||
property("sonar.host.url", "https://sonarcloud.io")
|
||||
property(
|
||||
"sonar.coverage.jacoco.xmlReportPaths",
|
||||
"${layout.buildDirectory.get()}/reports/jacoco/test/jacocoTestReport.xml"
|
||||
)
|
||||
property("sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user