This repository has been archived by the owner on May 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a basic circleci config. (#73)
* Adding a basic circleci config. * Optimizations.
- Loading branch information
1 parent
04a6861
commit eee0242
Showing
5 changed files
with
115 additions
and
12 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,104 @@ | ||
version: 2.1 | ||
executors: | ||
kin-executor: | ||
working_directory: ~/code | ||
docker: | ||
- image: circleci/android:api-28 | ||
resource_class: xlarge | ||
environment: | ||
JVM_OPTS: -Xmx3200m | ||
|
||
references: | ||
gradle_key: &gradle_key | ||
jars-{{ checksum "build.gradle" }}-{{ checksum "kin-backup-and-restore/kin-backup-and-restore-lib/build.gradle" }}-{{ checksum "kin-backup-and-restore/kin-backup-and-restore-sample/build.gradle" }}-{{ checksum "kin-backup-and-restore/kin-backup-and-restore-ui-tests/build.gradle" }}-{{ checksum "kin-sdk/kin-base/build.gradle" }}-{{ checksum "kin-sdk/kin-sdk-lib/build.gradle" }}-{{ checksum "kin-sdk/kin-sdk-sample/build.gradle" }} | ||
|
||
restore_gradle_cache: &restore_gradle_cache | ||
restore_cache: | ||
key: *gradle_key | ||
|
||
save_gradle_cache: &save_gradle_cache | ||
save_cache: | ||
key: *gradle_key | ||
paths: | ||
- ~/.gradle | ||
- ~/.m2 | ||
|
||
android_dependencies: &android_dependencies | ||
run: | ||
name: Download Android Dependencies | ||
command: ./gradlew androidDependencies | ||
|
||
gcloud_init: &gcloud_init | ||
run: | ||
name: gcloud Init | ||
command: | | ||
./scripts/ci_gcloud_init.sh | ||
jobs: | ||
build: | ||
executor: kin-executor | ||
steps: | ||
- checkout | ||
- *restore_gradle_cache | ||
- *android_dependencies | ||
- *save_gradle_cache | ||
- run: | ||
name: Assemble | ||
command: ./gradlew assemble | ||
|
||
unit_and_integration_test: | ||
executor: kin-executor | ||
steps: | ||
- checkout | ||
- *restore_gradle_cache | ||
- *android_dependencies | ||
- *save_gradle_cache | ||
- run: | ||
name: Run Unit & Integration Tests | ||
command: ./gradlew testDebugUnitTest jacocoTestReport | ||
|
||
android_tests_sdk_lib: | ||
executor: kin-executor | ||
steps: | ||
- checkout | ||
- *restore_gradle_cache | ||
- *android_dependencies | ||
- *save_gradle_cache | ||
- *gcloud_init | ||
- run: | ||
name: Run kin-sdk-lib Android Tests | ||
command: ./scripts/ci_android_test_with_firebase.sh kin-sdk kin-sdk-sample kin-sdk-lib 2 | ||
|
||
android_tests_backup_and_restore: | ||
executor: kin-executor | ||
steps: | ||
- checkout | ||
- *restore_gradle_cache | ||
- *android_dependencies | ||
- *save_gradle_cache | ||
- *gcloud_init | ||
- run: | ||
name: Run kin-backup-and-restore-lib Android Tests | ||
command: ./scripts/ci_android_test_with_firebase.sh kin-backup-and-restore kin-backup-and-restore-sample kin-backup-and-restore-lib 0 | ||
|
||
ui_autormator_tests: | ||
executor: kin-executor | ||
steps: | ||
- checkout | ||
- *restore_gradle_cache | ||
- *android_dependencies | ||
- *save_gradle_cache | ||
- *gcloud_init | ||
- run: | ||
name: Run kin-backup-and-restore-ui-tests Ui Automator Tests | ||
command: ./scripts/ci_android_test_with_firebase.sh kin-backup-and-restore kin-backup-and-restore-ui-tests kin-backup-and-restore-ui-tests 0 | ||
|
||
workflows: | ||
version: 2 | ||
build-sdk: | ||
jobs: | ||
- build | ||
- unit_and_integration_test | ||
- android_tests_backup_and_restore | ||
- android_tests_sdk_lib | ||
- ui_autormator_tests |
File renamed without changes.
Binary file not shown.
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,8 @@ | ||
#!/usr/bin/env bash | ||
# download and extract google cloud sdk, if wasn't cache yet. | ||
if [ ! -f ./google-cloud-sdk/bin/gcloud ]; then | ||
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-241.0.0-linux-x86_64.tar.gz | ||
tar xf google-cloud-sdk-241.0.0-linux-x86_64.tar.gz | ||
fi | ||
echo $FIREBASE_KEY_FILE | ./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=- | ||
./google-cloud-sdk/bin/gcloud --quiet config set project ${FIREBASE_PROJECT_NAME} |