Skip to content

Commit

Permalink
Avoid
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke committed Feb 24, 2024
1 parent bc5a710 commit cecf87d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/build_workflow.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,10 @@ workflow(
name = "Upload test reports",
action = UploadArtifactV4(
name = "Junit",
path = listOf("**/build/test-results"),
path = listOf("**/build/reports/tests"),
retentionDays = UploadArtifactV4.RetentionPeriod.Default,
),
`if` = expr { always() }
)
// TODO enable on main
// uses(
// name = "Upload test reports",
// action = CustomAction(
// actionOwner = "mikepenz",
// actionName = "action-junit-report",
// actionVersion = "v4",
// inputs = mapOf(
// "report_paths" to "**/build/test-results/**/TEST-*.xml",
// )
// ),
// `if` = expr { failure() }
// )
}
}.writeToFile()
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ jobs:
uses: 'actions/upload-artifact@v4'
with:
name: 'Junit'
path: '**/build/test-results'
path: '**/build/reports/tests'
retention-days: '0'
if: '${{ always() }}'
1 change: 1 addition & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ android {
}
buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = versionFor(AndroidX.compose.compiler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onRoot
import com.github.takahirom.roborazzi.BuildConfig
import com.github.takahirom.roborazzi.ExperimentalRoborazziApi
import com.github.takahirom.roborazzi.RoborazziOptions
import com.github.takahirom.roborazzi.ThresholdValidator
import com.github.takahirom.roborazzi.captureRoboImage
import kotlinx.coroutines.flow.MutableStateFlow
import org.junit.Assume.assumeFalse
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.Rule
import org.robolectric.RuntimeEnvironment
Expand Down Expand Up @@ -45,9 +47,10 @@ abstract class ClockScreenshotTest {

@Before
fun check() {
// Robolectric RNG not supported on Windows
// https://github.com/robolectric/robolectric/issues/8312
assumeFalse(System.getProperty("os.name")?.startsWith("Windows") ?: false)
assumeFalse("Robolectric RNG not supported on Windows", System.getProperty("os.name")?.startsWith("Windows") ?: false)

assumeTrue("Screenshot tests not supported for release", BuildConfig.DEBUG)
}

fun runTest(isAmbient: Boolean = false, clock: @Composable () -> Unit) {
Expand Down

0 comments on commit cecf87d

Please sign in to comment.