6515f251a6
Signed-off-by: Unpublished <unpublished@gmx.net>
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
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
|
|
|
|
workflows:
|
|
version: 2
|
|
build-test:
|
|
jobs:
|
|
- build
|
|
- test:
|
|
requires:
|
|
- build
|