yaml update

This commit is contained in:
2020-05-16 14:39:24 +01:00
parent 3e9d6a1138
commit 4dd17da7a0

View File

@@ -1,31 +1,35 @@
version: 2 version: 2
jobs: jobs:
test: build:
working_directory: ~/code
docker: docker:
- image: circleci/android:api-29 # gcloud is baked into this image - image: circleci/android:api-29
environment:
- JVM_OPTS: -Xmx3200m
steps: steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run: - run:
name: Build debug APK and release APK name: Chmod permissions
command: | command: sudo chmod +x ./gradlew
./gradlew :app:assembleDebug
./gradlew :app:assembleDebugAndroidTest
- run: - run:
name: Store Google Service Account name: Download Dependencies
command: echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run: - run:
name: Authorize gcloud and set config defaults name: Run Tests
command: | command: ./gradlew lint test
sudo gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json - store_artifacts:
sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID} path: app/build/reports
- run: destination: reports
name: Test with Firebase Test Lab - store_test_results:
command: > path: app/build/test-results
sudo gcloud firebase test android run \ workflows:
--app <local_server_path>/<app_apk>.apk \ version: 2
--test <local_server_path>/<app_test_apk>.apk \ workflow:
--results-bucket cloud-test-${GOOGLE_PROJECT_ID} jobs:
- run: - build
name: Install gsutil dependency and copy test results data
command: |
sudo pip install -U crcmod
sudo gsutil -m cp -r -U `sudo gsutil ls gs://[BUCKET_NAME]/[OBJECT_NAME] | tail -1` ${CIRCLE_ARTIFACTS}/ | true