-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix failed test #797
base: main
Are you sure you want to change the base?
fix failed test #797
Changes from 9 commits
7a5f32c
808eb1f
c829f31
7f6a43c
3d5a1c4
c871954
fceca5f
3d3a17c
4aad875
42e30e6
1b0e1ae
b431cc0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,12 @@ jobs: | |
|
||
- run: ./gradlew testDevDebugUnitTest testDebugUnitTest --stacktrace | ||
|
||
- run: | | ||
./gradlew \ | ||
:core:data:iosSimulatorArm64Test \ | ||
:core:model:iosSimulatorArm64Test \ | ||
--stacktrace | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! The - run: ./gradlew \
testDevDebugUnitTest \
testDebugUnitTest \
:core:data:iosSimulatorArm64Test \
:core:model:iosSimulatorArm64Test \
--stacktrace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, CI failed 🙇 |
||
|
||
# Saving cost | ||
# - run: ./gradlew koverHtmlReportDevDebug --stacktrace | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,59 @@ | ||
plugins { | ||
id("droidkaigi.primitive.android") | ||
id("droidkaigi.primitive.android.kotlin") | ||
id("droidkaigi.primitive.android.compose") | ||
id("droidkaigi.primitive.android.hilt") | ||
id("droidkaigi.primitive.kmp") | ||
id("droidkaigi.primitive.kmp.android") | ||
id("droidkaigi.primitive.kmp.android.hilt") | ||
id("droidkaigi.primitive.kmp.compose") | ||
id("droidkaigi.primitive.kmp.ios") | ||
id("droidkaigi.primitive.detekt") | ||
} | ||
|
||
android.namespace = "io.github.droidkaigi.confsched.core.testing" | ||
|
||
dependencies { | ||
implementation(projects.core.model) | ||
implementation(projects.core.designsystem) | ||
implementation(projects.core.data) | ||
implementation(projects.core.droidkaigiui) | ||
implementation(projects.feature.main) | ||
implementation(projects.feature.sessions) | ||
implementation(projects.feature.profilecard) | ||
implementation(projects.feature.about) | ||
implementation(projects.feature.staff) | ||
implementation(projects.feature.sponsors) | ||
implementation(projects.feature.settings) | ||
implementation(projects.feature.favorites) | ||
implementation(projects.feature.eventmap) | ||
implementation(projects.feature.contributors) | ||
implementation(libs.daggerHiltAndroidTesting) | ||
implementation(libs.roborazzi) | ||
implementation(libs.kermit) | ||
implementation(libs.coilTest) | ||
api(projects.core.testingManifest) | ||
api(libs.composeNavigation) | ||
api(libs.roborazziRule) | ||
api(libs.roborazziCompose) | ||
api(libs.robolectric) | ||
api(libs.composeUiTestJunit4) | ||
implementation(libs.composeMaterialWindowSize) | ||
implementation(libs.composablePreviewScanner) | ||
implementation(libs.composablePreviewScannerJvm) | ||
implementation(libs.roborazziPreviewScannerSupport) | ||
kotlin { | ||
sourceSets { | ||
androidMain { | ||
dependencies { | ||
implementation(projects.core.model) | ||
implementation(projects.core.designsystem) | ||
implementation(projects.core.data) | ||
implementation(projects.core.droidkaigiui) | ||
implementation(projects.feature.main) | ||
implementation(projects.feature.sessions) | ||
implementation(projects.feature.profilecard) | ||
implementation(projects.feature.about) | ||
implementation(projects.feature.staff) | ||
implementation(projects.feature.sponsors) | ||
implementation(projects.feature.settings) | ||
implementation(projects.feature.favorites) | ||
implementation(projects.feature.eventmap) | ||
implementation(projects.feature.contributors) | ||
implementation(libs.daggerHiltAndroidTesting) | ||
implementation(libs.roborazzi) | ||
implementation(libs.kermit) | ||
implementation(libs.coilTest) | ||
api(projects.core.testingManifest) | ||
api(libs.composeNavigation) | ||
api(libs.roborazziRule) | ||
api(libs.roborazziCompose) | ||
api(libs.robolectric) | ||
api(libs.composeUiTestJunit4) | ||
implementation(libs.composeMaterialWindowSize) | ||
implementation(libs.composablePreviewScanner) | ||
implementation(libs.composablePreviewScannerJvm) | ||
implementation(libs.roborazziPreviewScannerSupport) | ||
} | ||
} | ||
|
||
commonMain { | ||
dependencies { | ||
implementation(libs.okIo) | ||
} | ||
} | ||
|
||
iosMain { | ||
dependencies { | ||
implementation(libs.okIo) | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.github.droidkaigi.confsched.testing.utils | ||
|
||
expect inline fun <T> readResourceFile(filePath: okio.Path, block: okio.BufferedSource.() -> T): T |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.github.droidkaigi.confsched.testing.utils | ||
|
||
import okio.BufferedSource | ||
import okio.FileSystem | ||
import okio.Path | ||
import okio.Path.Companion.toPath | ||
import platform.Foundation.NSBundle | ||
|
||
actual inline fun <T> readResourceFile(filePath: Path, block: BufferedSource.() -> T): T { | ||
return FileSystem.SYSTEM.read( | ||
NSBundle.mainBundle.bundlePath.toPath().parent!!.parent!!.parent!!.parent!! | ||
.div("src").div("commonTest").div("resources").div(filePath), | ||
) { | ||
block() | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.github.droidkaigi.confsched.testing.utils | ||
|
||
import okio.FileSystem | ||
import okio.Path.Companion.toPath | ||
|
||
actual inline fun <T> readResourceFile(filePath: okio.Path, block: okio.BufferedSource.() -> T): T { | ||
return FileSystem.SYSTEM.read( | ||
"src".toPath().div("commonTest").div("resources").div(filePath), | ||
) { | ||
block() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for delay. 🙇
There were another module for which iOS tests were not being run, so I specified them.
I am not similar with Gradle syntax, but is this acceptable?