-
Notifications
You must be signed in to change notification settings - Fork 24
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
[#491] Enhance CICD workflow for releasing production to Firebase App Distribution #554
Conversation
…n branch on production
Kover report for template-compose:🧛 Template - Compose Unit Tests Code Coverage:
|
File | Coverage |
---|
Modified Files Not Found In Coverage Report:
deploy_production_to_firebase_app_distribution.yml
deploy_staging_and_production_to_firebase_app_distribution.yml
Codebase cunningly covered by count Shroud 🧛
Generated by 🚫 Danger
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.
@thiennguyen0196 I think we should clone these CD workflows to actual run in the root .github folder to verify & ensure them can work properly 🙏
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.
name: Deploy staging and production to Firebase App Distribution | ||
|
||
on: | ||
# Trigger the workflow on push action in main branch. | ||
# So it will trigger when the PR of the feature branch was merged. | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy_staging_and_production_to_firebase_app_distribution: | ||
name: Deploy staging and production to Firebase App Distribution |
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.
same
- name: Set up timezone | ||
uses: zcong1993/setup-timezone@master | ||
with: | ||
timezone: Asia/Bangkok | ||
|
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'm sure deploy workflow does not need to Set up timezone
step 🙏 Same for staging workflow
- name: Run Detekt | ||
run: ./gradlew detekt | ||
|
||
- name: Archive Detekt reports | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: DetektReports | ||
path: build/reports/detekt/ | ||
|
||
- name: Run unit tests with Kover | ||
run: ./gradlew koverHtmlReport | ||
|
||
- name: Archive code coverage reports | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: CodeCoverageReports | ||
path: app/build/reports/kover/ | ||
|
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.
IMO, we don't need these code analyzing & testing steps on CD workflows. Let's save our billing resources 🙏 Same for staging workflow
path: app/build/reports/kover/ | ||
|
||
- name: Build production APK | ||
run: ./gradlew assembleProductionRelease |
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.
Do we need to set up keystore?
appId: ${{secrets.FIREBASE_APP_ID_PRODUCTION}} | ||
serviceCredentialsFileContent: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT }} | ||
groups: testers | ||
file: app/build/outputs/apk/production/debug/app-production-release.apk |
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.
file: app/build/outputs/apk/production/debug/app-production-release.apk | |
file: app/build/outputs/apk/production/release/app-production-release.apk |
@thiennguyen0196 please provide POW from actual workflows in the root |
#491
What happened 👀
develop
branch onstaging
andmain
branch onproduction
Insight 📝
N/A
Proof Of Work 📹
Show us the implementation: screenshots, GIFs, etc.