mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-26 15:18:19 +08:00
Run codecoverage and pass to sonarqube upload for processing.
This commit is contained in:
parent
49fbfe6811
commit
76844b1572
34
.github/workflows/nightly.yml
vendored
34
.github/workflows/nightly.yml
vendored
@ -308,15 +308,36 @@ jobs:
|
|||||||
emulator.log
|
emulator.log
|
||||||
failure_screenshots/
|
failure_screenshots/
|
||||||
|
|
||||||
|
codecov-units:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
|
java-version: '11'
|
||||||
|
- uses: action/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
- run: ./gradlew allCodeCoverageReport $CI_GRADLE_ARG_PROPERTIES
|
||||||
|
- name: Upload Codecov data
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: codecov-xml
|
||||||
|
path: |
|
||||||
|
build/jacoco/*.xml
|
||||||
|
|
||||||
sonarqube:
|
sonarqube:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
if: always()
|
if: always()
|
||||||
needs:
|
needs:
|
||||||
- integration-tests
|
- codecov-units
|
||||||
- ui-tests
|
|
||||||
# - unit-tests TODO: code coverage from here too
|
|
||||||
- build-android-test-matrix-sdk
|
|
||||||
- build-android-test-app
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
@ -331,6 +352,9 @@ jobs:
|
|||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
artifact: codecov-xml # will restore to build/ as a local run would do
|
||||||
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
|
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
|
||||||
env:
|
env:
|
||||||
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
|
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
@ -129,10 +129,12 @@ sonarqube {
|
|||||||
property "sonar.projectVersion", project(":vector").android.defaultConfig.versionName
|
property "sonar.projectVersion", project(":vector").android.defaultConfig.versionName
|
||||||
property "sonar.sourceEncoding", "UTF-8"
|
property "sonar.sourceEncoding", "UTF-8"
|
||||||
property "sonar.links.homepage", "https://github.com/vector-im/element-android/"
|
property "sonar.links.homepage", "https://github.com/vector-im/element-android/"
|
||||||
property "sonar.links.ci", "https://buildkite.com/matrix-dot-org/element-android"
|
property "sonar.links.ci", "https://github.com/vector-im/element-android/actions"
|
||||||
property "sonar.links.scm", "https://github.com/vector-im/element-android/"
|
property "sonar.links.scm", "https://github.com/vector-im/element-android/"
|
||||||
property "sonar.links.issue", "https://github.com/vector-im/element-android/issues"
|
property "sonar.links.issue", "https://github.com/vector-im/element-android/issues"
|
||||||
property "sonar.organization", "new_vector_ltd_organization"
|
property "sonar.organization", "new_vector_ltd_organization"
|
||||||
|
property "sonar.java.coveragePlugin", "jacoco"
|
||||||
|
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml"
|
||||||
property "sonar.login", project.hasProperty("SONAR_LOGIN") ? SONAR_LOGIN : "invalid"
|
property "sonar.login", project.hasProperty("SONAR_LOGIN") ? SONAR_LOGIN : "invalid"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user