forked from callstack/react-native-paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
131 lines (128 loc) · 3.39 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: 2
defaults: &defaults
docker:
- image: circleci/node:10
working_directory: ~/react-native-paper
jobs:
install-dependencies:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/react-native-paper
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}
- dependencies-
- restore_cache:
keys:
- dependencies-docs-{{ checksum "docs/package.json" }}
- dependencies-docs-
- restore_cache:
keys:
- dependencies-example-{{ checksum "example/package.json" }}
- dependencies-example-
- run: |
yarn install --cwd example --frozen-lockfile
yarn install --cwd docs --frozen-lockfile
yarn install --frozen-lockfile
- save_cache:
key: dependencies-{{ checksum "package.json" }}
paths: node_modules
- save_cache:
key: dependencies-docs-{{ checksum "docs/package.json" }}
paths: docs/node_modules
- save_cache:
key: dependencies-example-{{ checksum "example/package.json" }}
paths: example/node_modules
- persist_to_workspace:
root: .
paths: .
lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- run: |
yarn lint
typescript:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- run: yarn typescript
build-package:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- run: yarn prepare
unit-tests:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- restore_cache:
name: Restoring Jest Cache
keys:
- jest-cache-{{ .Branch }}
- jest-cache
- run: yarn test --maxWorkers=2 --coverage
- store_artifacts:
path: coverage
destination: coverage
- save_cache:
paths:
- ./cache/jest
key: jest-cache-{{ .Branch }}
build-docs:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- run: |
cd docs && yarn build && cd ..
bash .circleci/comment-artifacts.sh
- store_artifacts:
path: docs/dist
destination: docs
deploy-docs:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/react-native-paper
- add_ssh_keys:
fingerprints:
- "2f:b4:ed:e1:25:88:5c:4a:03:c2:16:40:56:70:29:29"
- run: |
bash .circleci/deploy-docs.sh
workflows:
version: 2
build-and-test:
jobs:
- install-dependencies
- lint:
requires:
- install-dependencies
- typescript:
requires:
- install-dependencies
- unit-tests:
requires:
- install-dependencies
- build-package:
requires:
- install-dependencies
- build-docs:
requires:
- install-dependencies
filters:
branches:
ignore: master
- deploy-docs:
requires:
- install-dependencies
filters:
branches:
only: master