Skip to content

Commit

Permalink
Code coverage merged and sent to SonarQube and reduced build log verb…
Browse files Browse the repository at this point in the history
…osity
  • Loading branch information
federicoiosue committed Dec 22, 2020
1 parent 3f63cce commit 8c5b63d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
avd-name: test
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
disable-animations: true
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest,androidx.test.filters.LargeTest jacocoTestReport --info
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest,androidx.test.filters.LargeTest jacocoTestReport --stacktrace
- name: SonarCloud static code analysis
run: ./gradlew sonar
env:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Omni-Notes
![License](https://img.shields.io/badge/License-GPLv3-red.svg)
[![CI workflow](https://github.com/federicoiosue/Omni-Notes/workflows/CI/badge.svg)](https://github.com/federicoiosue/Omni-Notes/actions?query=workflow%3ACI)
[![CodeQL Workflow](https://github.com/federicoiosue/Omni-Notes/workflows/CodeQL/badge.svg)](https://github.com/federicoiosue/Omni-Notes/actions?query=workflow%3ACodeQL)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/bd88260c6c5449edac6b18c834fffce5)](https://www.codacy.com/gh/federicoiosue/Omni-Notes/dashboard?utm_source=github.com&utm_medium=referral&utm_content=federicoiosue/Omni-Notes&utm_campaign=Badge_Grade)
[![Sonarcloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=omni-notes&metric=coverage)](https://sonarcloud.io/dashboard?id=omni-notes)
[![Sonarcloud Maintainability](https://sonarcloud.io/api/project_badges/measure?project=omni-notes&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=omni-notes)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/omni-notes/localized.png)](https://crowdin.com/project/omni-notes)
[![GitHub release](https://img.shields.io/github/release/federicoiosue/omni-notes.svg)](https://github.com/federicoiosue/Omni-Notes/releases/latest)

Expand Down
7 changes: 5 additions & 2 deletions omniNotes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ android.productFlavors.each { flavor ->
}

apply plugin: 'jacoco'
task jacocoTestReport(type: JacocoReport, dependsOn: ['testAlphaDebugUnitTest', 'createAlphaDebugCoverageReport']) {
task jacocoTestReport(type: JacocoReport, dependsOn: ['testAlphaDebugUnitTest', 'createAlphaDebugCoverageReport', 'connectedPlayDebugAndroidTest']) {

reports {
xml.enabled = true
Expand All @@ -256,7 +256,7 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['testAlphaDebugUnitTest',
classDirectories.from = files([debugTree])
executionData.from = fileTree(dir: "$buildDir", includes: [
"jacoco/testAlphaDebugUnitTest.exec",
"outputs/code-coverage/alphaDebugAndroidTest/connected/*coverage.ec"
"outputs/code_coverage/alphaDebugAndroidTest/connected/*coverage.ec"
])
}
jacoco {
Expand All @@ -265,6 +265,9 @@ jacoco {

apply plugin: 'com.adarshr.test-logger'
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']

testLogging {
events "standardOut", "standardError", "started", "passed", "skipped", "failed"
exceptionFormat "full"
Expand Down

0 comments on commit 8c5b63d

Please sign in to comment.