mirror of
https://github.com/hmalik144/Android-developer-tech-test---POQ.git
synced 2025-12-10 03:05:24 +00:00
Update config.yml
This commit is contained in:
@@ -1,31 +1,35 @@
|
|||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
build:
|
||||||
|
working_directory: ~/code
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/android:api-28-alpha # gcloud is baked into this image
|
- image: circleci/android:api-27-alpha
|
||||||
|
environment:
|
||||||
|
- JVM_OPTS: -Xmx3200m
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- checkout
|
||||||
name: Build debug APK and release APK
|
- restore_cache:
|
||||||
command: |
|
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||||
./gradlew :app:assembleDebug
|
- run:
|
||||||
./gradlew :app:assembleDebugAndroidTest
|
name: Chmod permissions
|
||||||
- run:
|
command: sudo chmod +x ./gradlew
|
||||||
name: Store Google Service Account
|
- run:
|
||||||
command: echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json
|
name: Download Dependencies
|
||||||
- run:
|
command: ./gradlew androidDependencies
|
||||||
name: Authorize gcloud and set config defaults
|
- save_cache:
|
||||||
command: |
|
paths:
|
||||||
sudo gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
|
- ~/.gradle
|
||||||
sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
|
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||||
- run:
|
- run:
|
||||||
name: Test with Firebase Test Lab
|
name: Run Tests
|
||||||
command: >
|
command: ./gradlew lint test
|
||||||
sudo gcloud firebase test android run \
|
- store_artifacts:
|
||||||
--app <local_server_path>/<app_apk>.apk \
|
path: app/build/reports
|
||||||
--test <local_server_path>/<app_test_apk>.apk \
|
destination: reports
|
||||||
--results-bucket cloud-test-${GOOGLE_PROJECT_ID}
|
- store_test_results:
|
||||||
- run:
|
path: app/build/test-results
|
||||||
name: Install gsutil dependency and copy test results data
|
workflows:
|
||||||
command: |
|
version: 2
|
||||||
sudo pip install -U crcmod
|
workflow:
|
||||||
sudo gsutil -m cp -r -U `sudo gsutil ls gs://[BUCKET_NAME]/[OBJECT_NAME] | tail -1` ${CIRCLE_ARTIFACTS}/ | true
|
jobs:
|
||||||
|
- build
|
||||||
|
|||||||
Reference in New Issue
Block a user