Skip to content

Commit

Permalink
Compose stability CI check (Ivy-Apps#2924)
Browse files Browse the repository at this point in the history
* Add support for Compose stability report

* WIP: Compose Stability workflow

* WIP: Parse the Compose report

* Identify unstable composables

* Parse unstable composables with their arguments

* Build a report for the unstable composables

* Generate report and update the workflows

* Suppress Detekt errors

* Add Compose stability baseline support

* Always upload the Compose stability report

* Add Compose Stability baseline

* Add `composeStabilityBaseline` script

* Add docs for the "Compose Stability" action
  • Loading branch information
ILIYANGERMANOV authored Feb 6, 2024
1 parent 3276644 commit 8ff4b75
Show file tree
Hide file tree
Showing 11 changed files with 583 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci_actions_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ jobs:
run: ./gradlew :ci-actions:issue-assign:test

- name: Test the CI "issue-create-comment" action
run: ./gradlew :ci-actions:issue-create-comment:test
run: ./gradlew :ci-actions:issue-create-comment:test

- name: Test the CI "compose_stability" action
run: ./gradlew :ci-actions:compose-stability:test
43 changes: 43 additions & 0 deletions .github/workflows/compose_stability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Composables stability

on:
push:
branches:
- main
pull_request:

jobs:
compose_stability:
runs-on: ubuntu-latest
steps:
- name: Checkout GIT
uses: actions/checkout@v4

- name: Setup Java SDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '18'

- name: Enable Gradle Wrapper caching (optimization)
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build Compose compiler report (Jetpack Compose)
run: ./gradlew assembleDemo -PcomposeCompilerReports=true

- name: Analyze the report (Ivy)
run: ./gradlew :ci-actions:compose-stability:run

- name: Upload the Compose Stability report
if: always()
uses: actions/upload-artifact@v4
with:
name: compose-stability-report
path: ci-actions/compose-stability/ivy-compose-stability-report.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ lint/reports/

# JS
node_modules/*
/ci-actions/compose-stability/ivy-compose-stability-report.txt
18 changes: 18 additions & 0 deletions buildSrc/src/main/kotlin/ivy.compose.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ android {
}
}

@Suppress("MaximumLineLength", "MaxLineLength")
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${project.buildDir.absolutePath}/compose_compiler"
)
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.buildDir.absolutePath}/compose_compiler"
)
}
}
}

dependencies {
implementation(libs.bundles.compose)

Expand Down
12 changes: 12 additions & 0 deletions ci-actions/compose-stability/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins {
id("ivy.script")
application
}

application {
mainClass = "ivy.automate.compose.stability.MainKt"
}

dependencies {
implementation(projects.ciActions.base)
}
280 changes: 280 additions & 0 deletions ci-actions/compose-stability/ivy-compose-stability-baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
com.ivy.design.api.ivyContext
com.ivy.design.l0_system.Gradient.Companion.black
com.ivy.design.l0_system.UI.<get-colors>
com.ivy.design.l0_system.UI.<get-typo>
com.ivy.design.l0_system.UI.<get-shapes>
com.ivy.design.l0_system.style
com.ivy.design.utils.densityScope
com.ivy.design.utils.rememberInteractionSource
com.ivy.design.utils.toDensityDp
com.ivy.design.utils.windowInsets
com.ivy.design.utils.navigationBarInsets
com.ivy.design.utils.keyboardOnlyWindowInsets
com.ivy.design.utils.keyboardVisibleState
com.ivy.legacy.ivyWalletCtx
com.ivy.legacy.rootView
com.ivy.legacy.rootActivity
com.ivy.legacy.rootScreen
com.ivy.frp.view.FRP
com.ivy.wallet.ui.theme.pureBlur
com.ivy.wallet.ui.theme.mediumBlur
com.ivy.wallet.ui.theme.gradientExpenses
com.ivy.wallet.ui.theme.Gradient.Companion.black
com.ivy.legacy.legacy.ui.theme.components.DateTimeRow
com.ivy.wallet.ui.theme.components.getCustomIconIdS
com.ivy.wallet.ui.theme.components.ReorderModalSingleType
com.ivy.wallet.ui.theme.components.ReorderModal
com.ivy.wallet.ui.theme.components.WrapContentRow
com.ivy.wallet.ui.theme.components.charts.linechart.IvyLineChart
com.ivy.wallet.ui.theme.components.charts.linechart.IvyChart
com.ivy.wallet.ui.theme.modal.BufferModal
com.ivy.wallet.ui.theme.modal.IconsRow
com.ivy.wallet.ui.theme.modal.ChoosePeriodModal
com.ivy.wallet.ui.theme.modal.IntervalFromToDate
com.ivy.wallet.ui.theme.modal.IvyModal
com.ivy.wallet.ui.theme.modal.ModalBackHandling
com.ivy.wallet.ui.theme.modal.AddModalBackHandling
com.ivy.wallet.ui.theme.modal.modalPreviewActionRowHeight
com.ivy.wallet.ui.theme.modal.LoanModal
com.ivy.wallet.ui.theme.modal.AccountsRow
com.ivy.wallet.ui.theme.modal.LoanRecordModal
com.ivy.wallet.ui.theme.modal.AccountsRow
com.ivy.wallet.ui.theme.modal.MonthPickerModal
com.ivy.wallet.ui.theme.modal.RecurringRuleModal
com.ivy.wallet.ui.theme.modal.OneTime
com.ivy.wallet.ui.theme.modal.MultipleTimes
com.ivy.wallet.ui.theme.modal.DateRow
com.ivy.wallet.ui.theme.modal.edit.AccountModal
com.ivy.wallet.ui.theme.modal.edit.AmountModal
com.ivy.wallet.ui.theme.modal.edit.circleButtonModifier
com.ivy.wallet.ui.theme.modal.edit.CategoryModal
com.ivy.wallet.ui.theme.modal.edit.ChooseCategoryModal
com.ivy.wallet.ui.theme.modal.edit.CategoryPicker
com.ivy.legacy.ui.component.IncomeExpensesCards
com.ivy.legacy.ui.component.edit.TransactionDateTime
com.ivy.wallet.ui.edit.core.DueDate
com.ivy.wallet.ui.edit.core.DueDateCard
com.ivy.wallet.ui.edit.core.EditBottomSheet
com.ivy.wallet.ui.edit.core.SheetHeader
com.ivy.wallet.ui.edit.core.AccountsRow
com.ivy.wallet.ui.edit.core.Title
com.ivy.wallet.ui.edit.core.Suggestions
com.ivy.wallet.ui.edit.core.Toolbar
com.ivy.legacy.ui.component.transaction.HistoryDateDivider
com.ivy.legacy.ui.component.transaction.TransactionHeaderRow
com.ivy.legacy.ui.component.transaction.TransferHeader
com.ivy.legacy.ui.component.transaction.TypeAmountCurrency
com.ivy.legacy.ui.component.transaction.category
com.ivy.legacy.ui.component.transaction.account
com.ivy.legacy.utils.windowInsets
com.ivy.legacy.utils.statusBarInset
com.ivy.legacy.utils.navigationBarInset
com.ivy.legacy.utils.navigationBarInsets
com.ivy.legacy.utils.keyboardOnlyWindowInsets
com.ivy.legacy.utils.densityScope
com.ivy.legacy.utils.rememberInteractionSource
com.ivy.legacy.utils.toDensityPx
com.ivy.legacy.utils.toDensityDp
com.ivy.legacy.utils.toDensityDp
com.ivy.legacy.utils.formatLocalTime
com.ivy.legacy.utils.rememberSwipeListenerState
com.ivy.legacy.utils.keyboardVisibleState
com.ivy.legacy.utils.UiText.asString
com.ivy.navigation.navigation
com.ivy.navigation.screenScopedViewModel
com.ivy.common.ui.rememberScrollPositionListState
com.ivy.data.datastore.datastore
com.ivy.domain.features.BoolFeature.asEnabledState
com.ivy.loans.loan.LoanViewModel.uiState
com.ivy.loans.loan.LoanViewModel.getReorderModalVisible
com.ivy.loans.loan.LoanViewModel.getLoanModalData
com.ivy.loans.loan.LoanViewModel.getLoans
com.ivy.loans.loan.LoanViewModel.getBaseCurrencyCode
com.ivy.loans.loan.LoanViewModel.getSelectedAccount
com.ivy.loans.loan.LoanViewModel.getAccounts
com.ivy.loans.loan.LoanViewModel.getPaidOffLoanVisibility
com.ivy.loans.loandetails.LoanDetailsViewModel.uiState
com.ivy.importdata.csv.ImportUI
com.ivy.importdata.csv.CSVRow
com.ivy.importdata.csv.CSVViewModel.uiState
com.ivy.importdata.csv.CSVViewModel.continueEnabled
com.ivy.importdata.csv.CSVViewModel.importantFields
com.ivy.importdata.csv.CSVViewModel.transferFields
com.ivy.importdata.csv.CSVViewModel.optionalFields
com.ivy.settings.SettingsViewModel.uiState
com.ivy.settings.SettingsViewModel.getCurrencyCode
com.ivy.settings.SettingsViewModel.getName
com.ivy.settings.SettingsViewModel.getCurrentTheme
com.ivy.settings.SettingsViewModel.getLockApp
com.ivy.settings.SettingsViewModel.getShowNotifications
com.ivy.settings.SettingsViewModel.getHideCurrentBalance
com.ivy.settings.SettingsViewModel.getHideIncome
com.ivy.settings.SettingsViewModel.getTreatTransfersAsIncomeExpense
com.ivy.settings.SettingsViewModel.getStartDateOfMonth
com.ivy.settings.SettingsViewModel.getProgressState
com.ivy.home.HomeLazyColumn
com.ivy.home.HomeViewModel.uiState
com.ivy.home.HomeViewModel.getTheme
com.ivy.home.HomeViewModel.getName
com.ivy.home.HomeViewModel.getPeriod
com.ivy.home.HomeViewModel.getBaseData
com.ivy.home.HomeViewModel.getHistory
com.ivy.home.HomeViewModel.getStats
com.ivy.home.HomeViewModel.getBalance
com.ivy.home.HomeViewModel.getBuffer
com.ivy.home.HomeViewModel.getUpcoming
com.ivy.home.HomeViewModel.getOverdue
com.ivy.home.HomeViewModel.getCustomerJourneyCards
com.ivy.home.HomeViewModel.getHideBalance
com.ivy.home.HomeViewModel.getExpanded
com.ivy.home.HomeViewModel.getHideIncome
com.ivy.releases.ReleasesViewModel.uiState
com.ivy.transaction.UI
com.ivy.transaction.EditTransactionViewModel.uiState
com.ivy.transaction.EditTransactionViewModel.getTransactionType
com.ivy.transaction.EditTransactionViewModel.getInitialTitle
com.ivy.transaction.EditTransactionViewModel.getTitleSuggestions
com.ivy.transaction.EditTransactionViewModel.getCurrency
com.ivy.transaction.EditTransactionViewModel.getDescription
com.ivy.transaction.EditTransactionViewModel.getDateTime
com.ivy.transaction.EditTransactionViewModel.getDueDate
com.ivy.transaction.EditTransactionViewModel.getAccounts
com.ivy.transaction.EditTransactionViewModel.getCategories
com.ivy.transaction.EditTransactionViewModel.getAccount
com.ivy.transaction.EditTransactionViewModel.getToAccount
com.ivy.transaction.EditTransactionViewModel.getCategory
com.ivy.transaction.EditTransactionViewModel.getAmount
com.ivy.transaction.EditTransactionViewModel.getHasChanges
com.ivy.transaction.EditTransactionViewModel.getDisplayLoanHelper
com.ivy.transaction.EditTransactionViewModel.getBackgroundProcessingStarted
com.ivy.transaction.EditTransactionViewModel.getCustomExchangeRateState
com.ivy.features.FeaturesViewModel.uiState
com.ivy.features.FeaturesViewModel.getFeatures
com.ivy.balance.BalanceViewModel.uiState
com.ivy.piechart.PieChart
com.ivy.piechart.PieChartStatisticViewModel.uiState
com.ivy.piechart.PieChartStatisticViewModel.getTransactionType
com.ivy.piechart.PieChartStatisticViewModel.getPeriod
com.ivy.piechart.PieChartStatisticViewModel.getBaseCurrency
com.ivy.piechart.PieChartStatisticViewModel.getTotalAmount
com.ivy.piechart.PieChartStatisticViewModel.getCategoryAmounts
com.ivy.piechart.PieChartStatisticViewModel.getSelectedCategory
com.ivy.piechart.PieChartStatisticViewModel.getAccountIdFilterList
com.ivy.piechart.PieChartStatisticViewModel.getShowCloseButtonOnly
com.ivy.piechart.PieChartStatisticViewModel.getFilterExcluded
com.ivy.piechart.PieChartStatisticViewModel.getTransactions
com.ivy.piechart.PieChartStatisticViewModel.getChoosePeriodModal
com.ivy.contributors.ContributorsViewModel.uiState
com.ivy.search.SearchViewModel.uiState
com.ivy.transactions.TransactionsViewModel.uiState
com.ivy.transactions.TransactionsViewModel.getPeriod
com.ivy.transactions.TransactionsViewModel.getBaseCurrency
com.ivy.transactions.TransactionsViewModel.getAccount
com.ivy.transactions.TransactionsViewModel.getCurrency
com.ivy.transactions.TransactionsViewModel.getCategories
com.ivy.transactions.TransactionsViewModel.getAccounts
com.ivy.transactions.TransactionsViewModel.getCategory
com.ivy.transactions.TransactionsViewModel.getBalance
com.ivy.transactions.TransactionsViewModel.getBalanceBaseCurrency
com.ivy.transactions.TransactionsViewModel.getIncome
com.ivy.transactions.TransactionsViewModel.getExpenses
com.ivy.transactions.TransactionsViewModel.getInitWithTransactions
com.ivy.transactions.TransactionsViewModel.getTreatTransfersAsIncomeExpense
com.ivy.transactions.TransactionsViewModel.getUpcomingExpenses
com.ivy.transactions.TransactionsViewModel.getUpcoming
com.ivy.transactions.TransactionsViewModel.getUpcomingExpanded
com.ivy.transactions.TransactionsViewModel.getUpcomingIncome
com.ivy.transactions.TransactionsViewModel.getHistory
com.ivy.transactions.TransactionsViewModel.getOverdue
com.ivy.transactions.TransactionsViewModel.getOverdueExpanded
com.ivy.transactions.TransactionsViewModel.getOverdueIncome
com.ivy.transactions.TransactionsViewModel.getOverdueExpenses
com.ivy.transactions.TransactionsViewModel.getAccountNameConfirmation
com.ivy.transactions.TransactionsViewModel.getEnableDeletionButton
com.ivy.transactions.TransactionsViewModel.getSkipAllModalVisible
com.ivy.transactions.TransactionsViewModel.getDeleteModal1Visible
com.ivy.transactions.TransactionsViewModel.getChoosePeriodModal
com.ivy.accounts.AccountsViewModel.uiState
com.ivy.accounts.AccountsViewModel.getBaseCurrency
com.ivy.accounts.AccountsViewModel.getAccountsData
com.ivy.accounts.AccountsViewModel.getTotalBalanceWithExcluded
com.ivy.accounts.AccountsViewModel.getTotalBalanceWithExcludedText
com.ivy.accounts.AccountsViewModel.getTotalBalanceWithoutExcluded
com.ivy.accounts.AccountsViewModel.getTotalBalanceWithoutExcludedText
com.ivy.accounts.AccountsViewModel.getReorderVisible
com.ivy.budgets.BudgetModal
com.ivy.budgets.CategoriesRow
com.ivy.budgets.UI
com.ivy.budgets.BudgetViewModel.uiState
com.ivy.budgets.BudgetViewModel.getBaseCurrency
com.ivy.budgets.BudgetViewModel.getTimeRange
com.ivy.budgets.BudgetViewModel.getCategories
com.ivy.budgets.BudgetViewModel.getAccounts
com.ivy.budgets.BudgetViewModel.getBudgets
com.ivy.budgets.BudgetViewModel.getReorderModalVisible
com.ivy.budgets.BudgetViewModel.getCategoryBudgetsTotal
com.ivy.budgets.BudgetViewModel.getAppBudgetMax
com.ivy.budgets.BudgetViewModel.getBudgetModalData
com.ivy.exchangerates.ExchangeRatesViewModel.uiState
com.ivy.attributions.AttributionsViewModel.uiState
com.ivy.categories.SortModal
com.ivy.categories.CategoriesViewModel.uiState
com.ivy.categories.CategoriesViewModel.getBaseCurrency
com.ivy.categories.CategoriesViewModel.getCategories
com.ivy.categories.CategoriesViewModel.getReorderModalVisible
com.ivy.categories.CategoriesViewModel.getCategoryModalData
com.ivy.categories.CategoriesViewModel.getSortOrder
com.ivy.categories.CategoriesViewModel.getSortModalVisible
com.ivy.planned.edit.UI
com.ivy.planned.edit.EditPlannedViewModel.uiState
com.ivy.planned.edit.EditPlannedViewModel.getCurrency
com.ivy.planned.edit.EditPlannedViewModel.getCategories
com.ivy.planned.edit.EditPlannedViewModel.getAccounts
com.ivy.planned.edit.EditPlannedViewModel.getTransactionType
com.ivy.planned.edit.EditPlannedViewModel.getStartDate
com.ivy.planned.edit.EditPlannedViewModel.getIntervalN
com.ivy.planned.edit.EditPlannedViewModel.getIntervalType
com.ivy.planned.edit.EditPlannedViewModel.getOneTime
com.ivy.planned.edit.EditPlannedViewModel.getInitialTitle
com.ivy.planned.edit.EditPlannedViewModel.getDescription
com.ivy.planned.edit.EditPlannedViewModel.getAccount
com.ivy.planned.edit.EditPlannedViewModel.getCategory
com.ivy.planned.edit.EditPlannedViewModel.getAmount
com.ivy.planned.edit.EditPlannedViewModel.getCategoryModalVisibility
com.ivy.planned.edit.EditPlannedViewModel.getDescriptionModalVisibility
com.ivy.planned.edit.EditPlannedViewModel.getDeleteTransactionModalVisibility
com.ivy.planned.edit.EditPlannedViewModel.getTransactionTypeModalVisibility
com.ivy.planned.edit.EditPlannedViewModel.getAmountModalVisibility
com.ivy.planned.edit.EditPlannedViewModel.getCategoryModalData
com.ivy.planned.edit.EditPlannedViewModel.getAccountModalData
com.ivy.planned.edit.EditPlannedViewModel.getRecurringRuleModalData
com.ivy.planned.edit.RecurringRule
com.ivy.planned.edit.RecurringRuleCard
com.ivy.planned.list.RuleTextRow
com.ivy.planned.list.PlannedPaymentsViewModel.uiState
com.ivy.planned.list.PlannedPaymentsViewModel.getCurrency
com.ivy.planned.list.PlannedPaymentsViewModel.getCategories
com.ivy.planned.list.PlannedPaymentsViewModel.getAccounts
com.ivy.planned.list.PlannedPaymentsViewModel.getOneTimePlannedPayment
com.ivy.planned.list.PlannedPaymentsViewModel.getRecurringPlannedPayment
com.ivy.planned.list.PlannedPaymentsViewModel.getOneTimeExpenses
com.ivy.planned.list.PlannedPaymentsViewModel.getOneTimeIncome
com.ivy.planned.list.PlannedPaymentsViewModel.getRecurringExpenses
com.ivy.planned.list.PlannedPaymentsViewModel.getRecurringIncome
com.ivy.planned.list.PlannedPaymentsViewModel.getRecurringPaymentsExpanded
com.ivy.planned.list.PlannedPaymentsViewModel.getOneTimePaymentsExpanded
com.ivy.onboarding.components.Suggestions
com.ivy.onboarding.steps.OnboardingAccounts
com.ivy.onboarding.steps.Accounts
com.ivy.onboarding.steps.OnboardingCategories
com.ivy.onboarding.steps.Categories
com.ivy.onboarding.viewmodel.OnboardingViewModel.uiState
com.ivy.reports.FilterOverlay
com.ivy.reports.TypeFilter
com.ivy.reports.TypeFilterCheckbox
com.ivy.reports.PeriodFilter
com.ivy.reports.AccountsFilter
com.ivy.reports.CategoriesFilter
com.ivy.reports.AmountFilter
com.ivy.reports.KeywordsFilter
com.ivy.reports.ReportViewModel.uiState
Loading

0 comments on commit 8ff4b75

Please sign in to comment.