/
config.yml
67 lines (64 loc) · 1.61 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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