From 982ded5cba060794f1cb1b9b15c5f88a8d940977 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Thu, 11 Aug 2022 10:45:28 -0700 Subject: [PATCH 1/9] test --- .github/workflows/identity_pull_request.yml | 83 +++++++++++++++++++++ identity/build.gradle | 1 + 2 files changed, 84 insertions(+) create mode 100644 .github/workflows/identity_pull_request.yml diff --git a/.github/workflows/identity_pull_request.yml b/.github/workflows/identity_pull_request.yml new file mode 100644 index 00000000000..718d55ee702 --- /dev/null +++ b/.github/workflows/identity_pull_request.yml @@ -0,0 +1,83 @@ +name: identity-example size diff +on: + pull_request: + paths: + - 'identity/**' + - 'stripe-core/**' + - 'camera-core/**' + - 'dependencies.gradle' +jobs: + # Checkout base branch and build the APK + build-base: + name: Build base + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.base_ref }} + - name: Build base branch + run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/release/identity-example-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-base.apk + - name: Upload APK + uses: actions/upload-artifact@v1 + with: + name: apk + path: identity-example/build/outputs/apk/release/identity-example-release-base.apk + + # Checkout PR branch and build the APK + build-pr: + name: Build PR + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build PR branch + run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/release/identity-example-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-pr.apk + - name: Upload APK + uses: actions/upload-artifact@v1 + with: + name: apk + path: identity-example/build/outputs/apk/release/identity-example-release-pr.apk + + # Execute Diffuse only when the two APKs are built successfully + diffuse: + needs: [ build-base, build-pr ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Download APKs + uses: actions/download-artifact@v1 + with: + name: apk + - name: diffuse + id: diffuse + uses: usefulness/diffuse-action@v1 + with: + old-file-path: apk/identity-example-release-base.apk + new-file-path: apk/identity-example-release-pr.apk + + # Post comment with output + + - uses: peter-evans/find-comment@v1 + id: find_comment + with: + issue-number: ${{ github.event.pull_request.number }} + body-includes: Diffuse output + + - uses: peter-evans/create-or-update-comment@v1 + if: ${{ steps.diffuse.outputs.diff-raw != null || steps.find_comment.outputs.comment-id != null }} + with: + body: | + Diffuse output: + + ${{ steps.diffuse.outputs.diff-gh-comment }} + edit-mode: replace + comment-id: ${{ steps.find_comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload diffuse output + uses: actions/upload-artifact@v2 + with: + name: diffuse-output + path: ${{ steps.diffuse.outputs.diff-file }} diff --git a/identity/build.gradle b/identity/build.gradle index 5215bec7737..dd6dacf9d93 100644 --- a/identity/build.gradle +++ b/identity/build.gradle @@ -65,6 +65,7 @@ dependencies { testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion" ktlint "com.pinterest:ktlint:$ktlintVersion" + // test } android { From cae20fdcf8777dd796f0cd357186e3c66c05801b Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Thu, 11 Aug 2022 10:58:47 -0700 Subject: [PATCH 2/9] update --- .github/workflows/identity_pull_request.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/identity_pull_request.yml b/.github/workflows/identity_pull_request.yml index 718d55ee702..cfbee9ddb0a 100644 --- a/.github/workflows/identity_pull_request.yml +++ b/.github/workflows/identity_pull_request.yml @@ -81,3 +81,17 @@ jobs: with: name: diffuse-output path: ${{ steps.diffuse.outputs.diff-file }} + + # Use emerge tools to analyze the example app size + apk-size-analysis: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Generate Android (or iOS) release bundle + run: ./gradlew :identity-example:bundleRelease + - name: Upload artifact to Emerge + uses: EmergeTools/emerge-upload-action@v1.0.2 + with: + artifact_path: identity-example/build/outputs/bundle/theme1Release/identity-example-theme1-release.aab + emerge_api_key: ${{ secrets.EMERGE_API_IDENTITY_EXAMPLE_KEY }} + build_type: release # Optional, change if your workflow builds a specific type \ No newline at end of file From a7a40f35cecde5a66cc6865088ba5e3444ecc061 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Thu, 11 Aug 2022 11:44:53 -0700 Subject: [PATCH 3/9] change --- .github/workflows/identity_pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/identity_pull_request.yml b/.github/workflows/identity_pull_request.yml index cfbee9ddb0a..a5c3ea4a089 100644 --- a/.github/workflows/identity_pull_request.yml +++ b/.github/workflows/identity_pull_request.yml @@ -17,7 +17,7 @@ jobs: with: ref: ${{ github.base_ref }} - name: Build base branch - run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/release/identity-example-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-base.apk + run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-base.apk - name: Upload APK uses: actions/upload-artifact@v1 with: @@ -32,7 +32,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Build PR branch - run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/release/identity-example-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-pr.apk + run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-pr.apk - name: Upload APK uses: actions/upload-artifact@v1 with: @@ -87,7 +87,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Generate Android (or iOS) release bundle + - name: Generate Android release bundle run: ./gradlew :identity-example:bundleRelease - name: Upload artifact to Emerge uses: EmergeTools/emerge-upload-action@v1.0.2 From ad96e4512b4d49a17e59a31cea17e49308f7ec07 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Thu, 11 Aug 2022 11:52:58 -0700 Subject: [PATCH 4/9] update emerge API key --- .github/workflows/identity_pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/identity_pull_request.yml b/.github/workflows/identity_pull_request.yml index a5c3ea4a089..360c0b14396 100644 --- a/.github/workflows/identity_pull_request.yml +++ b/.github/workflows/identity_pull_request.yml @@ -93,5 +93,5 @@ jobs: uses: EmergeTools/emerge-upload-action@v1.0.2 with: artifact_path: identity-example/build/outputs/bundle/theme1Release/identity-example-theme1-release.aab - emerge_api_key: ${{ secrets.EMERGE_API_IDENTITY_EXAMPLE_KEY }} + emerge_api_key: ${{ secrets.EMERGE_API_KEY }} build_type: release # Optional, change if your workflow builds a specific type \ No newline at end of file From b19e2ac6cedfe16a0b3f073250fdfd4dcba7e729 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Thu, 11 Aug 2022 12:17:48 -0700 Subject: [PATCH 5/9] change --- identity/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/identity/build.gradle b/identity/build.gradle index dd6dacf9d93..2d5255d319f 100644 --- a/identity/build.gradle +++ b/identity/build.gradle @@ -66,6 +66,7 @@ dependencies { ktlint "com.pinterest:ktlint:$ktlintVersion" // test + // test2 } android { From ae8b0bc4c964a09847aa0568f5e0db30714849f5 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Fri, 12 Aug 2022 11:21:53 -0700 Subject: [PATCH 6/9] change --- financial-connections/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/financial-connections/build.gradle b/financial-connections/build.gradle index 9e78adee1ea..d792467c089 100644 --- a/financial-connections/build.gradle +++ b/financial-connections/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion" implementation libs.mavericks - + // test kapt "com.google.dagger:dagger-compiler:$daggerVersion" testImplementation "androidx.arch.core:core-testing:$androidxArchCoreVersion" From af8c423e36b3904ed79ceb0bdf5405f8b026a0a2 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Fri, 12 Aug 2022 11:51:15 -0700 Subject: [PATCH 7/9] change --- .github/workflows/identity_pull_request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/identity_pull_request.yml b/.github/workflows/identity_pull_request.yml index 360c0b14396..c136a6d8442 100644 --- a/.github/workflows/identity_pull_request.yml +++ b/.github/workflows/identity_pull_request.yml @@ -32,7 +32,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Build PR branch - run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-pr.apk +# run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-pr.apk + run: ./gradlew :identity-example:assembleRelease && ls identity-example/build/outputs && ls identity-example/build && ls identity-example/build/outputs/apk && ls identity-example/build/outputs/apk/theme1 && ls identity-example/build/outputs/apk/theme1/release - name: Upload APK uses: actions/upload-artifact@v1 with: From 134abfd75a755efc53d9bf77f07619a17a9afb84 Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Fri, 12 Aug 2022 12:01:50 -0700 Subject: [PATCH 8/9] change --- .github/workflows/identity_pull_request.yml | 9 ++++----- financial-connections/build.gradle | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/identity_pull_request.yml b/.github/workflows/identity_pull_request.yml index c136a6d8442..0fa2d628b7d 100644 --- a/.github/workflows/identity_pull_request.yml +++ b/.github/workflows/identity_pull_request.yml @@ -17,12 +17,12 @@ jobs: with: ref: ${{ github.base_ref }} - name: Build base branch - run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-base.apk + run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/theme1/release/identity-example-release-base.apk - name: Upload APK uses: actions/upload-artifact@v1 with: name: apk - path: identity-example/build/outputs/apk/release/identity-example-release-base.apk + path: identity-example/build/outputs/apk/theme1/release/identity-example-release-base.apk # Checkout PR branch and build the APK build-pr: @@ -32,13 +32,12 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Build PR branch -# run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/release/identity-example-release-pr.apk - run: ./gradlew :identity-example:assembleRelease && ls identity-example/build/outputs && ls identity-example/build && ls identity-example/build/outputs/apk && ls identity-example/build/outputs/apk/theme1 && ls identity-example/build/outputs/apk/theme1/release + run: ./gradlew :identity-example:assembleRelease && mv identity-example/build/outputs/apk/theme1/release/identity-example-theme1-release-unsigned.apk identity-example/build/outputs/apk/theme1/release/identity-example-release-pr.apk - name: Upload APK uses: actions/upload-artifact@v1 with: name: apk - path: identity-example/build/outputs/apk/release/identity-example-release-pr.apk + path: identity-example/build/outputs/apk/theme1/release/identity-example-release-pr.apk # Execute Diffuse only when the two APKs are built successfully diffuse: diff --git a/financial-connections/build.gradle b/financial-connections/build.gradle index d792467c089..9e78adee1ea 100644 --- a/financial-connections/build.gradle +++ b/financial-connections/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion" implementation libs.mavericks - // test + kapt "com.google.dagger:dagger-compiler:$daggerVersion" testImplementation "androidx.arch.core:core-testing:$androidxArchCoreVersion" From 25fea2ef8e83a57820850bbfd03f9aa71082b19f Mon Sep 17 00:00:00 2001 From: Chen Cen Date: Fri, 12 Aug 2022 13:04:36 -0700 Subject: [PATCH 9/9] remove test change --- identity/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/identity/build.gradle b/identity/build.gradle index 2d5255d319f..5215bec7737 100644 --- a/identity/build.gradle +++ b/identity/build.gradle @@ -65,8 +65,6 @@ dependencies { testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion" ktlint "com.pinterest:ktlint:$ktlintVersion" - // test - // test2 } android {