2019-02-09 12:15:01 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/android:api-28
|
|
|
|
environment:
|
|
|
|
JVM_OPTS: -Xmx3200m
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: jars-{{ checksum "build.gradle" }}-{{ checksum "News-Android-App/build.gradle" }}
|
|
|
|
- run:
|
|
|
|
name: chmod permissions
|
|
|
|
command: chmod +x ./gradlew
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Download Dependencies
|
|
|
|
command: ./gradlew androidDependencies
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.gradle
|
|
|
|
key: jars-{{ checksum "build.gradle" }}-{{ checksum "News-Android-App/build.gradle" }}
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: ./gradlew assemble
|
|
|
|
- store_artifacts:
|
|
|
|
path: News-Android-App/build/outputs/apk
|
|
|
|
destination: apks
|
2019-04-09 18:56:54 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: News-Android-App
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
|
|
|
|
test:
|
|
|
|
docker:
|
|
|
|
- image: circleci/android:api-28
|
|
|
|
environment:
|
|
|
|
JVM_OPTS: -Xmx3200m
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: News-Android-App
|
|
|
|
- restore_cache:
|
|
|
|
key: jars-{{ checksum "build.gradle" }}-{{ checksum "News-Android-App/build.gradle" }}
|
|
|
|
- run:
|
|
|
|
name: chmod permissions
|
|
|
|
command: chmod +x ./gradlew
|
|
|
|
- run:
|
|
|
|
name: Run unit tests
|
|
|
|
command: ./gradlew test
|
2019-04-12 11:12:33 +00:00
|
|
|
- run:
|
|
|
|
name: Run Lint Tests
|
|
|
|
command: ./gradlew lint test
|
2019-04-09 18:56:54 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: News-Android-App/build/reports
|
|
|
|
destination: reports
|
|
|
|
- store_test_results:
|
|
|
|
path: News-Android-App/build/test-results
|
2019-02-09 12:15:01 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2019-04-09 18:56:54 +00:00
|
|
|
build-test:
|
2019-02-09 12:15:01 +00:00
|
|
|
jobs:
|
|
|
|
- build
|
2019-04-09 18:56:54 +00:00
|
|
|
- test:
|
|
|
|
requires:
|
|
|
|
- build
|