Skip to content
Merged
39 changes: 25 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
orbs:
codecov: codecov/[email protected]
ruby: circleci/ruby@2.0.0
ruby: circleci/ruby@2.5.3

commands:
restore_gradle_cache:
Expand All @@ -10,10 +10,11 @@ commands:
key: v1-gradle-wrapper-{{ arch }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
- restore_cache:
key: v1-gradle-cache-{{ arch }}-{{ checksum "build.gradle.kts" }}-{{ checksum "settings.gradle.kts" }}-{{ checksum "gradle.properties" }}-{{ checksum "app/build.gradle.kts" }}-{{ checksum "gradle/libs.versions.toml" }}

restore_bundler_cache:
steps:
- restore_cache:
key: v1-bundler-cache-{{ checksum "Gemfile.lock" }}
key: v1-bundler-cache-{{ arch }}-{{ checksum "Gemfile.lock" }}

save_gradle_cache:
steps:
Expand All @@ -25,41 +26,46 @@ commands:
paths:
- ~/.gradle/caches
key: v1-gradle-cache-{{ arch }}-{{ checksum "build.gradle.kts" }}-{{ checksum "settings.gradle.kts" }}-{{ checksum "gradle.properties" }}-{{ checksum "app/build.gradle.kts" }}-{{ checksum "gradle/libs.versions.toml" }}

save_bundler_cache:
steps:
- save_cache:
paths:
- vendor/bundle
key: v1-bundler-cache-{{ checksum "Gemfile.lock" }}

setup_android:
steps:
- checkout
- restore_gradle_cache
- restore_bundler_cache

executors:
android-machine:
machine:
image: android:2024.01.1
image: android:2024.11.1
android-docker:
docker:
- image: cimg/android:2024.01
- image: cimg/android:2025.04

jobs:
android-test:
executor: android-machine
resource_class: large
steps:
- checkout
- restore_gradle_cache
- restore_bundler_cache
- setup_android
- ruby/install-deps:
with-cache: true
- run:
name: Fastlane - run all tests with coverage report
command: |
bundle exec fastlane testDev
bundle exec fastlane lint
- run: ./gradlew lintDebug
- save_gradle_cache
- save_bundler_cache
- run:
name: Analyze on SonarCloud
command: ./gradlew lintDebug sonar
command: ./gradlew sonar
- codecov/upload:
files: app/build/mergedReportDir/jacocoTestReport/jacocoTestReport.xml
- store_test_results:
Expand All @@ -71,14 +77,15 @@ jobs:
executor: android-docker
resource_class: large
steps:
- checkout
- restore_gradle_cache
- setup_android
- run:
name: Prepare Fastlane
command: sudo bundle update
- run:
name: Distribute to Firebase AppTester Dev
command: bundle exec fastlane distDev
- save_gradle_cache
- save_bundler_cache
- store_artifacts:
path: /home/circleci/project/app/build/outputs/apk/debug/app-debug.apk
destination: fastlane-output-debug
Expand All @@ -87,8 +94,7 @@ jobs:
executor: android-docker
resource_class: large
steps:
- checkout
- restore_gradle_cache
- setup_android
- run:
name: Prepare Fastlane
command: sudo bundle update
Expand All @@ -98,6 +104,8 @@ jobs:
- run:
name: Distribute to Firebase AppTester Prod
command: bundle exec fastlane distProd
- save_gradle_cache
- save_bundler_cache
- store_artifacts:
path: /home/circleci/project/app/build/outputs/bundle/release/app-release.aab
destination: fastlane-output-release
Expand All @@ -108,4 +116,7 @@ workflows:
- android-test:
context: SonarCloud
- distribute-dev
- distribute-internal-testing
- distribute-internal-testing:
requires:
- android-test

10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1125.0)
aws-sdk-core (3.226.2)
aws-partitions (1.1131.0)
aws-sdk-core (3.226.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
Expand All @@ -21,7 +21,7 @@ GEM
aws-sdk-kms (1.106.0)
aws-sdk-core (~> 3, >= 3.225.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.192.0)
aws-sdk-s3 (1.193.0)
aws-sdk-core (~> 3, >= 3.225.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -164,13 +164,13 @@ GEM
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.12.2)
json (2.13.0)
jwt (2.10.2)
base64
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multi_json (1.17.0)
multipart-post (2.4.1)
mutex_m (0.3.0)
nanaimo (0.4.0)
Expand Down
5 changes: 0 additions & 5 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ platform :android do
])
end

desc "Runs lint"
lane :lint do
gradle(task: "lintDebug")
end

desc "Deploy to Firebase AppTester Dev channel"
lane :distDev do
gradle(tasks: [
Expand Down