-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
483 additions
and
386 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,93 @@ | ||
version: 2 | ||
config_android: | ||
docker: | ||
- image: circleci/android:api-28-alpha | ||
working_directory: ~/project | ||
environment: | ||
JAVA_TOOL_OPTIONS: -Xmx1024m | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false | ||
TERM: dumb | ||
setup_ftl: | ||
- run: | ||
name: Authorize gcloud and set config defaults | ||
command: | | ||
echo $GCLOUD_SERVICE_KEY | base64 -di > ${HOME}/gcloud-service-key.json | ||
sudo gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json | ||
sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID} | ||
jobs: | ||
build_and_setup: | ||
docker: | ||
- image: circleci/android:api-28-alpha | ||
working_directory: ~/project | ||
environment: | ||
- JAVA_TOOL_OPTIONS: -Xmx1024m | ||
- GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false | ||
- TERM: dumb | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build test and lint | ||
command: | | ||
cd todoapp | ||
./gradlew assembleMockDebug assembleProdDebug assembleMockDebugAndroidTest testMockDebug testProdDebug lintMockDebug lintProdDebug | ||
- run: | ||
name: Save test results | ||
command: | | ||
mkdir -p ~/junit/ | ||
find . -type f -regex "./todoapp/.*/build/test-results/.*xml" -exec cp {} ~/junit/ \; | ||
when: always | ||
- store_test_results: | ||
path: ~/junit | ||
- store_artifacts: | ||
path: ~/junit | ||
destination: tests | ||
- store_artifacts: | ||
path: ./todoapp/app/build/reports | ||
destination: reports/ | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./todoapp/app/build | ||
run_ftl: | ||
docker: | ||
- image: circleci/android:api-28-alpha | ||
working_directory: ~/project | ||
environment: | ||
- JAVA_TOOL_OPTIONS: -Xmx1024m | ||
- GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false | ||
- TERM: dumb | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Authorize gcloud and set config defaults | ||
command: | | ||
echo $GCLOUD_SERVICE_KEY | base64 -di > ${HOME}/gcloud-service-key.json | ||
sudo gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json | ||
sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID} | ||
- run: | ||
name: Test with Firebase Test Lab | ||
command: | | ||
BUILD_DIR=build_${CIRCLE_BUILD_NUM} | ||
sudo gcloud firebase test android run \ | ||
--app todoapp/app/build/outputs/apk/mock/debug/app-mock-debug.apk \ | ||
--test todoapp/app/build/outputs/apk/androidTest/mock/debug/app-mock-debug-androidTest.apk \ | ||
--results-bucket cloud-test-${GOOGLE_PROJECT_ID}-blueprints \ | ||
--results-dir=${BUILD_DIR} | ||
- run: | ||
name: Download results | ||
command: | | ||
BUILD_DIR=build_${CIRCLE_BUILD_NUM} | ||
sudo pip install -U crcmod | ||
mkdir firebase_test_results | ||
sudo gsutil -m mv -r -U `sudo gsutil ls gs://cloud-test-${GOOGLE_PROJECT_ID}-blueprints/${BUILD_DIR} | tail -1` firebase_test_results/ | true | ||
- store_artifacts: | ||
path: firebase_test_results | ||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- build_and_setup | ||
- run_ftl: | ||
requires: | ||
- build_and_setup |
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 |
---|---|---|
@@ -1,29 +0,0 @@ | ||
machine: | ||
java: | ||
version: oraclejdk8 | ||
environment: | ||
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' | ||
|
||
checkout: | ||
post: | ||
- cp -r licenses/. $ANDROID_HOME/licenses | ||
dependencies: | ||
pre: | ||
- sudo pip install -U crcmod | ||
- echo y | android update sdk --no-ui --all --filter "tools,platform-tools,build-tools-26.0.2,android-26,extra-android-m2repository,extra-google-m2repository" | ||
|
||
post: | ||
- cd todoapp;./gradlew :app:assembleDebug -PdisablePreDex | ||
- cd todoapp;./gradlew :app:assembleAndroidTest -PdisablePreDex | ||
- echo ${GCLOUD_SERVICE_KEY} | base64 --decode > ${HOME}/client-secret.json | ||
- sudo /opt/google-cloud-sdk/bin/gcloud config set project android-devrel-ci | ||
- sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update | ||
- sudo /opt/google-cloud-sdk/bin/gcloud auth activate-service-account travis-ci-for-blueprints@android-devrel-ci.iam.gserviceaccount.com --key-file ${HOME}/client-secret.json | ||
|
||
test: | ||
override: | ||
- echo "y" | sudo /opt/google-cloud-sdk/bin/gcloud firebase test android run --app todoapp/app/build/outputs/apk/mock/debug/app-mock-debug.apk --test todoapp/app/build/outputs/apk/androidTest/mock/debug/app-mock-debug-androidTest.apk -d Nexus5X -v 26 -l fr --results-bucket cloud-test-android-devrel-ci | ||
post: | ||
- sudo /opt/google-cloud-sdk/bin/gsutil -m cp -r -U `sudo /opt/google-cloud-sdk/bin/gsutil ls gs://cloud-test-android-devrel-ci | tail -1` $CIRCLE_ARTIFACTS/ | true | ||
- mkdir -p $CIRCLE_TEST_REPORTS/junit/ | ||
- find $CIRCLE_ARTIFACTS -name \*.xml -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; | ||
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 |
---|---|---|
|
@@ -5,5 +5,6 @@ build | |
.gradle | ||
# Eclipse project files | ||
.project | ||
.settings/ | ||
.settings/ | ||
.classpath | ||
.DS_Store |
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
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
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
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
Oops, something went wrong.