nimblehq / kmm-templates

MIT License
2 stars 0 forks source link

[#6] [Android] Set up CD workflow #48

Closed lydiasama closed 8 months ago

lydiasama commented 8 months ago

What happened 👀

These CD workflow script works with the following condition:

Insight 📝

Proof Of Work 📹

Staging:

Screenshot 2566-11-08 at 3 51 05 PM

Production: Screenshot 2566-11-08 at 3 50 48 PM

github-actions[bot] commented 8 months ago
23 Warnings
:warning: Big PR
:warning: Uh oh! ApiClient.kt is under 95% coverage!
:warning: Uh oh! ApiException.kt is under 95% coverage!
:warning: Uh oh! AppDestination.kt is under 95% coverage!
:warning: Uh oh! AppNavigation.kt is under 95% coverage!
:warning: Uh oh! AppStyles.kt is under 95% coverage!
:warning: Uh oh! BaseViewModel.kt is under 95% coverage!
:warning: Uh oh! DispatchersProviderImpl.kt is under 95% coverage!
:warning: Uh oh! ErrorMapping.kt is under 95% coverage!
:warning: Uh oh! FlowExt.kt is under 95% coverage!
:warning: Uh oh! HomeScreen.kt is under 95% coverage!
:warning: Uh oh! HttpRequestBuilderExtension.kt is under 95% coverage!
:warning: Uh oh! RemoteDataSource.kt is under 95% coverage!
:warning: Uh oh! Theme.kt is under 95% coverage!
:warning: Uh oh! UiModel.kt is under 95% coverage!
:warning: Uh oh! Your project is under 80% coverage!
:warning: android/src/main/java/co/nimblehq/kmm/template/ui/screens/home/HomeScreen.kt#L66 - This expression contains a magic number. Consider defining it to a well named constant.
:warning: shared/src/androidMain/kotlin/co/nimblehq/kmm/template/Platform.android.kt#L3 - The file name 'Platform.android' does not match the name of the single top-level declaration 'AndroidPlatform'.
:warning: shared/src/androidUnitTest/kotlin/co/nimblehq/kmm/template/androidTest.kt#L6 - The file name 'androidTest' does not match the name of the single top-level declaration 'AndroidGreetingTest'.
:warning: shared/src/commonTest/kotlin/co/nimblehq/kmm/template/commonTest.kt#L6 - The file name 'commonTest' does not match the name of the single top-level declaration 'CommonGreetingTest'.
:warning: shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt#L18 - Exception is a too generic Exception. Prefer throwing specific exceptions that indicate a specific error case.
:warning: shared/src/iosMain/kotlin/co/nimblehq/kmm/template/Platform.ios.kt#L5 - The file name 'Platform.ios' does not match the name of the single top-level declaration 'IOSPlatform'.
:warning: shared/src/iosTest/kotlin/co/nimblehq/kmm/template/iosTest.kt#L6 - The file name 'iosTest' does not match the name of the single top-level declaration 'IosGreetingTest'.

Kover report:

🧛 Unit Tests Code Coverage: 59.92%

Coverage of Modified Files:

File Coverage
ApiClient.kt 0.00%
ApiException.kt 0.00%
AppColors.kt 98.11%
AppDestination.kt 83.87%
AppDimensions.kt 100.00%
AppNavigation.kt 52.63%
AppShapes.kt 100.00%
AppStyles.kt 0.00%
AppTypography.kt 100.00%
BaseViewModel.kt 73.91%
ContextExt.kt 100.00%
DispatchersProviderImpl.kt 0.00%
ErrorMapping.kt 88.00%
FlowExt.kt 76.19%
Greeting.kt 100.00%
HomeScreen.kt 64.16%
HomeViewModel.kt 100.00%
HttpRequestBuilderExtension.kt 0.00%
MainActivity.kt 100.00%
MainApplication.kt 100.00%
Model.kt 100.00%
Platform.android.kt 100.00%
RemoteDataSource.kt 0.00%
RepositoryImpl.kt 100.00%
Response.kt 100.00%
ResponseMapping.kt 100.00%
Theme.kt 46.09%
UiModel.kt 84.21%
UseCase.kt 100.00%

Modified Files Not Found In Coverage Report:

.gitignore .gitignore AppModule.kt BaseScreenTest.kt Constant.swift CoroutineTestRule.kt DebugProduction.xcconfig DebugStaging.xcconfig DispatchersProvider.kt Fake.kt Gemfile.lock HomeScreenTest.kt HomeViewModelTest.kt Koin.kt MockUtil.kt Platform.ios.kt Platform.kt PlatformModule.kt PlatformModule.kt PlatformModule.kt Podfile.lock ReleaseProduction.xcconfig ReleaseStaging.xcconfig RemoteModule.kt Repository.kt RepositoryModule.kt RepositoryTest.kt ResponseMappingTest.kt TypeAlias.kt UseCaseModule.kt UseCaseTest.kt ViewModelModule.kt androidTest.kt build.gradle.kts build.gradle.kts commonTest.kt deploy_production.yml deploy_production.yml deploy_staging.yml deploy_staging.yml iosTest.kt proguard-rules.pro proguard-rules.pro project.pbxproj test.yml test.yml

Codebase cunningly covered by count Shroud 🧛

Generated by :no_entry_sign: Danger

github-actions[bot] commented 8 months ago
1 Warning
:warning: This pull request is quite big (954 lines changed), please consider splitting it into multiple pull requests.

SwiftFormat found issues:

File Rules
fastlane/Constants/Constant.swift:122:1 warning: (trailingSpace) Remove trailing space at end of a line.
fastlane/Constants/Constant.swift:129:1 warning: (trailingSpace) Remove trailing space at end of a line.
fastlane/Constants/Constant.swift:145:1 warning: (trailingSpace) Remove trailing space at end of a line.
fastlane/Constants/Constant.swift:153:1 warning: (trailingSpace) Remove trailing space at end of a line.
fastlane/Constants/Constant.swift:160:1 warning: (trailingSpace) Remove trailing space at end of a line.
fastlane/Constants/Constant.swift:164:1 warning: (spaceAroundOperators) Add or remove space around operators or delimiters.
fastlane/Constants/Constant.swift:167:1 warning: (trailingSpace) Remove trailing space at end of a line.

Current coverage for sample is 18.25%

No files affecting coverage found


Powered by xcov

Generated by :no_entry_sign: Danger

lydiasama commented 8 months ago

All updated. @luongvo @phongvhd93 🙏🏻

lydiasama commented 8 months ago

All resolved @luongvo @phongvhd93 🙏🏻

luongvo commented 8 months ago

@lydiasama There is an issue from the last PR #47

image

I will help to fix the issue, that blocks the app distribution now https://github.com/nimblehq/kmm-templates/actions/runs/7045328250/job/19174810667 🙏

luongvo commented 8 months ago

Deploying Staging works https://github.com/nimblehq/kmm-templates/actions/runs/7045508929

luongvo commented 8 months ago

Deploying Production works https://github.com/nimblehq/kmm-templates/actions/runs/7045508919/job/19175387489

luongvo commented 8 months ago

Okay, the test.yml CI should run on feature branches https://github.com/nimblehq/kmm-templates/actions/runs/7045672326?pr=48