Skip to content

Commit

Permalink
Fix Migrator test and also add the test to build script (#896)
Browse files Browse the repository at this point in the history
* Fix MigratorTest after update to Kotlin 2.0.0

* add main module's test to build script
  • Loading branch information
cuong-tran authored Jun 22, 2024
1 parent 0ce1cf2 commit e57638a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2

- name: Build app and run unit tests
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest
2 changes: 1 addition & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2

- name: Build app and run unit tests
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest

# Sign APK and create release for tags

Expand Down
2 changes: 1 addition & 1 deletion app/src/test/java/mihon/core/migration/MigratorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MigratorTest {
fun initilize() {
migrationContext = MigrationContext(false)
migrationJobFactory = spyk(MigrationJobFactory(migrationContext, CoroutineScope(Dispatchers.Main + Job())))
migrationCompletedListener = spyk<() -> Unit>({})
migrationCompletedListener = spyk<MigrationCompletedListener>(block = {})
migrationStrategyFactory = spyk(MigrationStrategyFactory(migrationJobFactory, migrationCompletedListener))
}

Expand Down

0 comments on commit e57638a

Please sign in to comment.