Skip to content

Commit

Permalink
Merge pull request #8202 from vector-im/feature/bma/fixCi
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
bmarty authored Mar 3, 2023
2 parents 4f64b20 + ceda85f commit 97b4730
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
if: ${{ always() && env.GITHUB_TOKEN != '' && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }}
run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
run: ./gradlew sonar $CI_GRADLE_ARG_PROPERTIES

- name: Format unit test results
if: always()
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ if (launchTask.contains("coverage".toLowerCase())) {
apply plugin: 'org.sonarqube'

// To run a sonar analysis:
// Run './gradlew sonarqube -Dsonar.login=<REPLACE_WITH_SONAR_KEY>'
// Run './gradlew sonar -Dsonar.login=<REPLACE_WITH_SONAR_KEY>'
// The SONAR_KEY is stored in passbolt as Token Sonar Cloud Bma

sonarqube {
sonar {
properties {
property "sonar.projectName", "element-android"
property "sonar.projectKey", "vector-im_element-android"
Expand All @@ -225,7 +225,7 @@ sonarqube {
}

project(":vector") {
sonarqube {
sonar {
properties {
property "sonar.sources", project(":vector").android.sourceSets.main.java.srcDirs
// exclude source code from analyses separated by a colon (:)
Expand All @@ -236,13 +236,13 @@ project(":vector") {
}

project(":library:external:diff-match-patch") {
sonarqube {
sonar {
skipProject = true
}
}

//project(":matrix-sdk-android") {
// sonarqube {
// sonar {
// properties {
// property "sonar.sources", project(":matrix-sdk-android").android.sourceSets.main.java.srcDirs
// // exclude source code from analyses separated by a colon (:)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal class WorkManagerProvider @Inject constructor(
private val coroutineDispatchers: MatrixCoroutineDispatchers,
private val sessionScope: CoroutineScope
) {
private val tag = MATRIX_SDK_TAG_PREFIX + sessionId
val tag = MATRIX_SDK_TAG_PREFIX + sessionId

val workManager = WorkManager.getInstance(context)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ internal class FakeWorkManagerProvider(

val instance = mockk<WorkManagerProvider>().also {
every { it.workManager } returns fakeWorkManager.instance
every { it.tag } returns "Tag"
}
}

0 comments on commit 97b4730

Please sign in to comment.