news-android/.circleci/config.yml

68 lines
1.6 KiB
YAML
Raw Permalink Normal View History

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
- 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
- run:
name: Run Lint Tests
command: ./gradlew lint test
- 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
build-test:
2019-02-09 12:15:01 +00:00
jobs:
- build
- test:
requires:
- build