66# -------------------------
77
88aliases :
9- # -------------------------
10- # CACHE
11- # -------------------------
12- - &restore-yarn-cache
13- keys :
14- - yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
15- - yarn-cache-{{ arch }}
9+ # -------------------------
10+ # CACHE
11+ # -------------------------
12+ - &restore-yarn-cache
13+ keys :
14+ - yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
15+ - yarn-cache-{{ arch }}
1616
17- - &save-yarn-cache
18- paths :
19- - ~/.cache/yarn
20- - ~/Library/Detox/ios
21- key : yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
17+ - &save-yarn-cache
18+ paths :
19+ - ~/.cache/yarn
20+ - ~/Library/Detox/ios
21+ key : yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
2222
23- # -------------------------
24- # INSTALLATION
25- # -------------------------
26- - &yarn
27- name : Yarn Install
28- command : |
29- yarn install --network-concurrency 1 --non-interactive --cache-folder ~/.cache/yarn & wait
23+ # -------------------------
24+ # INSTALLATION
25+ # -------------------------
26+ - &yarn
27+ name : Yarn Install
28+ command : |
29+ yarn install --network-concurrency 1 --non-interactive --cache-folder ~/.cache/yarn & wait
3030
31- # -------------------------
32- # ANALYSE
33- # -------------------------
31+ # -------------------------
32+ # ANALYSE
33+ # -------------------------
34+
35+ - &flow
36+ name : Flow Checks
37+ command : yarn test:flow
3438
35- - &flow
36- name : Flow Checks
37- command : yarn test:flow
39+ - &javascript
40+ name : Javascript Tests
41+ command : yarn test:js
3842
39- - &javascript
40- name : Javascript Tests
41- command : yarn test:js
43+ - &eslint
44+ name : Lint
45+ command : yarn lint
4246
4347# -------------------------
4448# DEFAULTS
4549# -------------------------
4650defaults : &defaults
4751 working_directory : ~/react-native-push-notification-ios
4852 environment :
49- - GIT_COMMIT_DESC : git log --format=oneline -n 1 $CIRCLE_SHA1
53+ - GIT_COMMIT_DESC : git log --format=oneline -n 1 $CIRCLE_SHA1
5054
5155# JAVASCRIPT
5256js_defaults : &js_defaults
5357 << : *defaults
5458 docker :
55- - image : circleci/node:8
59+ - image : circleci/node:8
5660 environment :
57- - PATH : " /opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
61+ - PATH : " /opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
5862
5963# -------------------------
6064# JOBS
@@ -65,30 +69,36 @@ jobs:
6569 checkout-code :
6670 << : *js_defaults
6771 steps :
68- - checkout
69- - restore-cache : *restore-yarn-cache
70- - run : rm -rf node_modules
71- - run : yarn cache clean
72- - run : *yarn
73- - save-cache : *save-yarn-cache
74- - persist_to_workspace :
75- root : .
76- paths : .
72+ - checkout
73+ - restore-cache : *restore-yarn-cache
74+ - run : rm -rf node_modules
75+ - run : yarn cache clean
76+ - run : *yarn
77+ - save-cache : *save-yarn-cache
78+ - persist_to_workspace :
79+ root : .
80+ paths : .
7781
7882 flow :
7983 << : *js_defaults
8084 steps :
81- - attach_workspace :
82- at : ~/react-native-push-notification-ios
83- - run : *flow
84-
85+ - attach_workspace :
86+ at : ~/react-native-push-notification-ios
87+ - run : *flow
88+
8589 javascript :
8690 << : *js_defaults
8791 steps :
88- - attach_workspace :
89- at : ~/react-native-push-notification-ios
90- - run : *javascript
92+ - attach_workspace :
93+ at : ~/react-native-push-notification-ios
94+ - run : *javascript
9195
96+ lint :
97+ << : *js_defaults
98+ steps :
99+ - attach_workspace :
100+ at : ~/react-native-push-notification-ios
101+ - run : *eslint
92102
93103# -------------------------
94104# WORK FLOWS
@@ -97,10 +107,13 @@ workflows:
97107 version : 2
98108 Test :
99109 jobs :
100- - checkout-code
101- - flow :
102- requires :
103- - checkout-code
104- - javascript :
105- requires :
106- - checkout-code
110+ - checkout-code
111+ - flow :
112+ requires :
113+ - checkout-code
114+ - javascript :
115+ requires :
116+ - checkout-code
117+ - lint :
118+ requires :
119+ - checkout-code
0 commit comments