-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from luongvo/release/0.1.0
Release 0.1.0
- Loading branch information
Showing
168 changed files
with
3,672 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# @luongvo is the owner and the others are code reviewers | ||
* @suho @blyscuit @doannimble @manh-t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Android - Deploy Production build to Firebase | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy_android_production_to_firebase: | ||
name: Deploy android production to Firebase | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup BuildKonfig Properties | ||
env: | ||
BUILD_KONFIG_PROPERTIES: ${{ secrets.BUILD_KONFIG_PROPERTIES }} | ||
run: | | ||
echo $BUILD_KONFIG_PROPERTIES | base64 --decode > buildKonfig.properties | ||
- name: Setup Google Services | ||
env: | ||
ANDROID_PRODUCTION_GOOGLE_SERVICES_JSON: ${{ secrets.ANDROID_PRODUCTION_GOOGLE_SERVICES_JSON }} | ||
run: | | ||
mkdir -p android/src/production | ||
echo $ANDROID_PRODUCTION_GOOGLE_SERVICES_JSON > android/src/production/google-services.json | ||
- name: Setup Android release signing | ||
env: | ||
ANDROID_RELEASE_KEYSTORE: ${{ secrets.ANDROID_RELEASE_KEYSTORE }} | ||
ANDROID_SIGNING_PROPERTIES: ${{ secrets.ANDROID_SIGNING_PROPERTIES }} | ||
run: | | ||
echo $ANDROID_RELEASE_KEYSTORE | base64 --decode > config/release.keystore | ||
echo $ANDROID_SIGNING_PROPERTIES | base64 --decode > signing.properties | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches/modules-* | ||
~/.gradle/caches/jars-* | ||
~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: chkfung/[email protected] | ||
with: | ||
gradlePath: android/build.gradle.kts | ||
versionCode: ${{ github.run_number }} | ||
|
||
- name: Build Production release APK | ||
run: ./gradlew assembleProductionRelease | ||
|
||
- name: Deploy staging to Firebase | ||
uses: wzieba/Firebase-Distribution-Github-Action@v1 | ||
with: | ||
appId: '1:835959262689:android:cfc4c7eb6425a49c0896a0' | ||
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }} | ||
groups: nimble | ||
file: android/build/outputs/apk/production/release/android-production-release.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Android - Deploy Staging build to Firebase | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy_android_staging_to_firebase: | ||
name: Deploy android staging to Firebase | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup BuildKonfig Properties | ||
env: | ||
BUILD_KONFIG_PROPERTIES: ${{ secrets.BUILD_KONFIG_PROPERTIES }} | ||
run: | | ||
echo $BUILD_KONFIG_PROPERTIES | base64 --decode > buildKonfig.properties | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches/modules-* | ||
~/.gradle/caches/jars-* | ||
~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: chkfung/[email protected] | ||
with: | ||
gradlePath: android/build.gradle.kts | ||
versionCode: ${{ github.run_number }} | ||
|
||
- name: Build Staging APK | ||
run: ./gradlew assembleStagingDebug | ||
|
||
- name: Deploy staging to Firebase | ||
uses: wzieba/Firebase-Distribution-Github-Action@v1 | ||
with: | ||
appId: '1:835959262689:android:d9b8f785d7bf477a0896a0' | ||
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }} | ||
groups: nimble | ||
file: android/build/outputs/apk/staging/debug/android-staging-debug.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Review pull request | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, reopened, edited, synchronize, ready_for_review ] | ||
|
||
jobs: | ||
review_pull_request: | ||
name: Review pull request | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup BuildKonfig Properties | ||
env: | ||
BUILD_KONFIG_PROPERTIES: ${{ secrets.BUILD_KONFIG_PROPERTIES }} | ||
run: | | ||
echo $BUILD_KONFIG_PROPERTIES | base64 --decode > buildKonfig.properties | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches/modules-* | ||
~/.gradle/caches/jars-* | ||
~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Run Detekt | ||
run: ./gradlew detekt | ||
|
||
- name: Run Lint | ||
run: ./gradlew lintStagingDebug | ||
|
||
- name: Run unit tests with Kover | ||
run: ./gradlew koverMergedXmlReport | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
bundler-cache: true | ||
|
||
- name: Run Danger | ||
env: | ||
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: bundle exec danger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet | ||
warn("PR is classed as Work in Progress") if github.pr_title.include? "WIP" | ||
|
||
# Warn when there is a big PR | ||
warn("Big PR") if git.lines_of_code > 500 | ||
|
||
# Warn to encourage a PR description | ||
warn("Please provide a summary in the PR description to make it easier to review") if github.pr_body.length == 0 | ||
|
||
# Warn to encourage that labels should have been used on the PR | ||
warn("Please add labels to this PR") if github.pr_labels.empty? | ||
|
||
# Check commits lint and warn on all checks (instead of failing) | ||
commit_lint.check warn: :all, disable: [:subject_length] | ||
|
||
# Detekt output check | ||
detekt_dir = "build/reports/detekt/detekt.xml" | ||
Dir[detekt_dir].each do |file_name| | ||
kotlin_detekt.skip_gradle_task = true | ||
kotlin_detekt.report_file = file_name | ||
kotlin_detekt.detekt(inline_mode: true) | ||
end | ||
|
||
# Android Lint output check | ||
lint_dir = "**/build/reports/lint-results-stagingDebug.xml" | ||
Dir[lint_dir].each do |file_name| | ||
android_lint.skip_gradle_task = true | ||
android_lint.report_file = file_name | ||
android_lint.lint(inline_mode: true) | ||
end | ||
|
||
# Show Danger test coverage report from Kover | ||
kover_dir = "build/reports/kover/merged/xml/report.xml" | ||
Dir[kover_dir].each do |file_name| | ||
# Report coverage of modified files, warn if total project coverage is under 80% | ||
# or if any modified file's coverage is under 95% | ||
module_name = file_name.split('/', 2)[0] | ||
shroud.reportKover module_name, file_name, 80, 95, false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | ||
|
||
# Android | ||
gem 'danger' | ||
gem 'danger-android_lint' | ||
gem 'danger-commit_lint' | ||
gem 'danger-kotlin_detekt' | ||
gem 'danger-shroud' |
Oops, something went wrong.