forked from cornerstonejs/cornerstoneTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
187 lines (177 loc) · 4.25 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:10.15.1
jobs:
checkout_code:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- persist_to_workspace:
root: ~/repo
paths: .
test_and_report:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run: npm rebuild
- run:
name: Install codecov
command: npm install --save-dev codecov
- run:
name: Jest Tests && Codecov Report
command: npm run test:ci
- store_artifacts:
path: ./coverage/
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: ./coverage/
build:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run: npm rebuild
- run:
name: Build our app
command: npm run build
- persist_to_workspace:
root: ~/repo
paths: .
publish_npm:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run:
name: Avoid hosts unknown for github
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run:
name: Publish using Semantic Release
command: npx semantic-release
- persist_to_workspace:
root: ~/repo
paths: .
publish_docs:
working_directory: ~/repo
docker:
- image: circleci/ruby:2.6.0-node
environment:
BUNDLE_PATH: ~/repo/vendor/bundle
steps:
- attach_workspace:
at: ~/repo
- run:
name: Avoid hosts unknown for github
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: npm install
- run: sudo npm install gitbook-cli -g
- run:
name: Do Magic
command: sh ~/repo/.circleci/update-docs.sh
deployment:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run:
name: Write NPM Token to ~/.npmrc
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Bump version number
command: sh ~/repo/.circleci/version.sh
- run:
name: Publish package
command: npm publish --tag next
workflows:
version: 2
###
# PULL REQUESTS
###
test_build:
jobs:
- checkout_code:
filters:
branches:
ignore:
- master
- feature/*
- hotfix/*
- test_and_report:
requires:
- checkout_code
- build:
requires:
- checkout_code
###
# MERGE: MASTER
###
test_build_publish:
jobs:
- checkout_code:
filters:
branches:
only: master
- test_and_report:
requires:
- checkout_code
- build:
requires:
- checkout_code
- publish_npm:
requires:
- checkout_code
- test_and_report
- build
# - build_examples:
# requires:
# - publish_npm
- publish_docs:
requires:
- publish_npm
###
# MERGE: VNEXT
###
test_build_deploy:
jobs:
- checkout_code:
filters:
branches:
only: vNext
- test_and_report:
requires:
- checkout_code
- build:
requires:
- checkout_code
- deployment:
requires:
- checkout_code
- test_and_report
- build
# filters:
# branches:
# only:
# - development
# - master
# - production