Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into renovate/gradle-8.x
Browse files Browse the repository at this point in the history
Conflicts:
	gradle/plugins-inventory/gradle/wrapper/gradle-wrapper.properties
	gradle/wrapper/gradle-wrapper.properties
  • Loading branch information
TWiStErRob committed Jan 18, 2025
2 parents 568c898 + 3801cd5 commit 0989bb9
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# github/codeql-action/upload-sarif -> https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
security-events: write

runs-on: ubuntu-latest
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

previews:
name: "🪟 Generate Previews"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 5

permissions:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
# actions/checkout
contents: read

runs-on: ubuntu-latest
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
instrumentation:
name: "${{ matrix.api }}"

uses: TWiStErRob/github-workflows/.github/workflows/instrumentation.yml@1e06403c5d561d70e40109c2701ea3092ca6ded7 # v3
uses: TWiStErRob/github-workflows/.github/workflows/instrumentation.yml@1851e9c09214df39596b289eef626688ba3a0269 # v3
with:
android-api: ${{ matrix.api }}
timeout-minutes: 60
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

validate:
name: "🦺 Validation"
uses: TWiStErRob/github-workflows/.github/workflows/validate.yml@1e06403c5d561d70e40109c2701ea3092ca6ded7 # v3
uses: TWiStErRob/github-workflows/.github/workflows/validate.yml@1851e9c09214df39596b289eef626688ba3a0269 # v3
permissions:
contents: read
security-events: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/svg-instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
instrumentation:
name: "${{ matrix.api }}"

uses: TWiStErRob/github-workflows/.github/workflows/instrumentation.yml@1e06403c5d561d70e40109c2701ea3092ca6ded7 # v3
uses: TWiStErRob/github-workflows/.github/workflows/instrumentation.yml@1851e9c09214df39596b289eef626688ba3a0269 # v3
with:
android-api: ${{ matrix.api }}
name-artifact-fine-grained: 'SVG {0}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/svg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

validate:
name: "🦺 Validation"
uses: TWiStErRob/github-workflows/.github/workflows/validate.yml@1e06403c5d561d70e40109c2701ea3092ca6ded7 # v3
uses: TWiStErRob/github-workflows/.github/workflows/validate.yml@1851e9c09214df39596b289eef626688ba3a0269 # v3
permissions:
contents: read
security-events: write
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package net.twisterrob.inventory.android.space

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestDispatcher
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.setMain
import org.junit.rules.TestWatcher
import org.junit.runner.Description

class MainDispatcherRule(
val testDispatcher: TestDispatcher = StandardTestDispatcher(),
) : TestWatcher() {
override fun starting(description: Description) {
@OptIn(ExperimentalCoroutinesApi::class)
Dispatchers.setMain(testDispatcher)
}

override fun finished(description: Description) {
@OptIn(ExperimentalCoroutinesApi::class)
Dispatchers.resetMain()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import net.twisterrob.inventory.android.space.sizes.SizesDomain
import net.twisterrob.inventory.android.space.sizes.SizesDomainToStateMapper
import net.twisterrob.java.utils.ReflectionTools
import net.twisterrob.test.TestRuntimeException
import org.junit.Rule
import org.junit.Test
import org.mockito.kotlin.inOrder
import org.mockito.kotlin.mock
Expand All @@ -27,6 +28,9 @@ class ManageSpaceViewModelTest {
private val mockMapper: SizesDomainToStateMapper = mock()
private val mockManager: InventorySpaceManager = mock()

@get:Rule
val mainDispatcherRule = MainDispatcherRule()

@Test
fun `load sizes - success`() = runTest {
ManageSpaceViewModel(mockUseCase, mockMapper, mockManager).test(this) {
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ twisterrob = "0.17" # https://github.com/TWiStErRob/net.twisterrob.gradle/releas
detekt = "1.23.7"
kotlin = "2.1.0"
kotlin-ksp = "2.1.0-1.0.29"
kotlin-coroutines = "1.9.0"
kotlin-coroutines = "1.10.1"

glide = "4.16.0"
androidsvg = "1.4"
flexbox = "3.0.0"
slf4j = "2.0.16"
dagger = "2.53.1"
dagger = "2.55"
orbit = "9.0.0"

androidx-activity = "1.7.2" # https://developer.android.com/jetpack/androidx/releases/activity
Expand Down Expand Up @@ -66,7 +66,7 @@ guava = "27.0.1-jre"
jbrAnn = "26.0.1"

test-junit4 = "4.13.2"
test-mockito = "5.14.2"
test-mockito = "5.15.2"
test-mockito-kotlin = "5.4.0"
test-mockito-android = "3.12.4"
test-robolectric = "4.14.1"
Expand Down

0 comments on commit 0989bb9

Please sign in to comment.