forked from xotahal/react-native-material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
84 lines (75 loc) · 1.63 KB
/
circle.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
version: 2
# Used Workspace
workspace: &workspace
~/mui
# Config for node
node_config: &node_config
working_directory: *workspace
docker:
- image: circleci/node:8
# Key to cache gradle dependecies
yarn_key: &yarn_key
yarn-cache-{{ checksum "yarn.lock" }}
jobs:
install-dependencies:
<<: *node_config
steps:
- checkout
- attach_workspace:
at: *workspace
- restore_cache:
key: *yarn_key
- run:
name: Intal yarn dependencies
command: yarn
- save_cache:
key: *yarn_key
paths: node_modules
- persist_to_workspace:
root: .
paths: .
lint:
<<: *node_config
steps:
- attach_workspace:
at: *workspace
- run:
name: Lint
command: yarn lint
test:
<<: *node_config
steps:
- attach_workspace:
at: *workspace
- run:
name: Jest
command: yarn test
publish:
<<: *node_config
steps:
- attach_workspace:
at: *workspace
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/mui/.npmrc
- run:
name: Publish
command: npm publish
workflows:
version: 2
test-and-deploy:
jobs:
- install-dependencies
- lint:
requires:
- install-dependencies
- test:
requires:
- install-dependencies
- publish:
requires:
- lint
- test
filters:
branches:
only: 'publish'