diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bcf9d07b3..e1925499a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -56,9 +56,11 @@ jobs: env: GOOGLE_SERVICES: ${{ steps.op-secrets.outputs.GOOGLE_SERVICES }} - - id: gradle + - id: gradle-build run: ./gradlew build --console=plain + - run: ./gradlew detektAll --continue --console=plain + - id: screenshot-validation run: ./gradlew validateScreenshotTest --console=plain @@ -70,7 +72,7 @@ jobs: path: "**/build/reports/screenshotTest/preview/debug" - uses: thollander/actions-comment-pull-request@v3 - if: ${{ steps.gradle.outputs.build-scan-url }} + if: ${{ steps.gradle-build.outputs.build-scan-url }} with: message: "Build scan published to ${{ steps.gradle.outputs.build-scan-url }}" comment-tag: build-scan-url diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTest/EventsDetailPreview_Day_839dc042_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTests/EventsDetailPreview_Day_839dc042_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTest/EventsDetailPreview_Day_839dc042_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTests/EventsDetailPreview_Day_839dc042_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTest/EventsDetailPreview_Night_a6299619_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTests/EventsDetailPreview_Night_a6299619_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTest/EventsDetailPreview_Night_a6299619_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsDetailTests/EventsDetailPreview_Night_a6299619_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTest/EventsListPreview_Day_839dc042_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTests/EventsListPreview_Day_839dc042_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTest/EventsListPreview_Day_839dc042_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTests/EventsListPreview_Day_839dc042_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTest/EventsListPreview_Night_a6299619_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTests/EventsListPreview_Night_a6299619_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTest/EventsListPreview_Night_a6299619_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/events/EventsListTests/EventsListPreview_Night_a6299619_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryBottomSheetPreview_Day_839dc042_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryBottomSheetPreview_Day_839dc042_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryBottomSheetPreview_Day_839dc042_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryBottomSheetPreview_Day_839dc042_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryBottomSheetPreview_Night_a6299619_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryBottomSheetPreview_Night_a6299619_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryBottomSheetPreview_Night_a6299619_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryBottomSheetPreview_Night_a6299619_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryGridPreview_Day_839dc042_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryGridPreview_Day_839dc042_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryGridPreview_Day_839dc042_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryGridPreview_Day_839dc042_0.png diff --git a/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryGridPreview_Night_a6299619_0.png b/conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryGridPreview_Night_a6299619_0.png similarity index 100% rename from conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryListTest/GalleryGridPreview_Night_a6299619_0.png rename to conferences-app/src/debug/screenshotTest/reference/io/ashdavies/party/gallery/GalleryScreenTests/GalleryGridPreview_Night_a6299619_0.png diff --git a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsDetailTest.kt b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsDetailTests.kt similarity index 80% rename from conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsDetailTest.kt rename to conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsDetailTests.kt index ef43c9716..2f935cbdf 100644 --- a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsDetailTest.kt +++ b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsDetailTests.kt @@ -4,11 +4,11 @@ import androidx.compose.runtime.Composable import io.ashdavies.party.tooling.MaterialPreviewTheme import io.ashdavies.party.tooling.PreviewDayNight -internal class EventsDetailTest { +internal class EventsDetailTests { @Composable @PreviewDayNight - fun EventsDetailPreview() { + private fun EventsDetailPreview() { MaterialPreviewTheme { EventsDetail(DroidconBerlin) } diff --git a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsListTest.kt b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsListTests.kt similarity index 89% rename from conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsListTest.kt rename to conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsListTests.kt index efdef18dc..67b14d8d0 100644 --- a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsListTest.kt +++ b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/events/EventsListTests.kt @@ -11,11 +11,11 @@ import kotlinx.coroutines.flow.flowOf private val DroidconEvents = listOf(AndroidMakers, DroidconBerlin, DroidconLondon) -internal class EventsListTest { +internal class EventsListTests { @Composable @PreviewDayNight - fun EventsListPreview(data: List = DroidconEvents) { + private fun EventsListPreview(data: List = DroidconEvents) { MaterialPreviewTheme { EventsList( state = EventsScreen.State(lazyPagingItems(flowOf(PagingData.from(data)))), diff --git a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/gallery/GalleryScreenTests.kt b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/gallery/GalleryScreenTests.kt index d41d68c42..ffab7ea29 100644 --- a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/gallery/GalleryScreenTests.kt +++ b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/gallery/GalleryScreenTests.kt @@ -6,12 +6,12 @@ import io.ashdavies.party.tooling.MaterialPreviewTheme import io.ashdavies.party.tooling.PreviewDayNight import kotlinx.collections.immutable.persistentListOf -internal class GalleryListTest { +internal class GalleryScreenTests { @Composable @PreviewDayNight @OptIn(ExperimentalFoundationApi::class) - fun GalleryGridPreview() { + private fun GalleryGridPreview() { MaterialPreviewTheme { GalleryGrid( itemList = persistentListOf( @@ -29,7 +29,7 @@ internal class GalleryListTest { @Composable @PreviewDayNight - fun GalleryBottomSheetPreview() { + private fun GalleryBottomSheetPreview() { MaterialPreviewTheme { GallerySheetContent(eventSink = { }) } diff --git a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/home/HomeScreenTests.kt b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/home/HomeScreenTests.kt index 9848c0e39..3c49fa489 100644 --- a/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/home/HomeScreenTests.kt +++ b/conferences-app/src/screenshotTest/kotlin/io/ashdavies/party/home/HomeScreenTests.kt @@ -12,7 +12,7 @@ internal class HomeScreenTests { @Composable @PreviewDayNight @OptIn(ExperimentalMaterial3Api::class) - fun HomeTopAppBarPreview() { + private fun HomeTopAppBarPreview() { MaterialPreviewTheme { HomeTopBar( actions = { @@ -27,7 +27,7 @@ internal class HomeScreenTests { @Composable @PreviewDayNight - fun HomeBottomSheetPreview() { + private fun HomeBottomSheetPreview() { MaterialPreviewTheme { HomeBottomBar() } diff --git a/detekt-config.yml b/detekt-config.yml index 6c6883380..7f77553cc 100644 --- a/detekt-config.yml +++ b/detekt-config.yml @@ -19,6 +19,8 @@ naming: style: MagicNumber: ignorePropertyDeclaration: true + UnusedPrivateMember: + ignoreAnnotated: ['Preview', 'PreviewDayNight'] UnusedPrivateProperty: excludes: - '**/*.gradle.kts'