@@ -7,7 +7,7 @@ executors:
7
7
node-executor :
8
8
docker :
9
9
- image : circleci/node:latest
10
- working_directory : ~/repo
10
+ working_directory : ~/workspace
11
11
12
12
jobs :
13
13
install :
@@ -17,32 +17,83 @@ jobs:
17
17
- run : npm --version
18
18
- run : yarn --version
19
19
20
- - checkout
20
+ - checkout :
21
+ path : postdfm
22
+
23
+ - restore_cache :
24
+ keys :
25
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/yarn.lock" }}
26
+
27
+ - run :
28
+ command : yarn --frozen-lockfile && yarn changed
29
+ working_directory : postdfm
30
+
31
+ - save_cache :
32
+ paths :
33
+ - postdfm/node_modules
34
+ # for nearleyc
35
+ - postdfm/packages/@postdfm/dfm2ast/node_modules
36
+ key : node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/yarn.lock" }}
37
+
38
+ install-with-sourcemaps :
39
+ executor : node-executor
40
+ steps :
41
+ - checkout :
42
+ path : postdfm
21
43
- restore_cache :
22
44
keys :
23
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
45
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/ yarn.lock" }}
24
46
25
- - run : yarn --frozen-lockfile
47
+ - run : mv postdfm postdfm-with-sourcemaps
26
48
27
49
- save_cache :
28
50
paths :
29
- - node_modules
51
+ - postdfm-with-sourcemaps/ node_modules
30
52
# for nearleyc
31
- - packages/@postdfm/dfm2ast/node_modules
32
- key : node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
53
+ - postdfm-with-sourcemaps/ packages/@postdfm/dfm2ast/node_modules
54
+ key : node-{{ .Environment.CACHE_VERSION }}-dependencies-with-sourcemaps- {{ checksum "postdfm-with-sourcemaps/ yarn.lock" }}
33
55
34
56
compile :
35
57
executor : node-executor
36
58
steps :
37
- - checkout
59
+ - checkout :
60
+ path : postdfm
61
+
62
+ - restore_cache :
63
+ keys :
64
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/yarn.lock" }}
65
+
66
+ - run :
67
+ command : yarn compile && yarn changed
68
+ working_directory : postdfm
69
+
70
+ - persist_to_workspace :
71
+ root : postdfm/packages
72
+ paths :
73
+ - ./postdfm/dist
74
+ - ./@postdfm/ast/dist
75
+ - ./@postdfm/ast2dfm/dist
76
+ - ./@postdfm/dfm2ast/dist
77
+ - ./@postdfm/dfm2ast/src
78
+ - ./@postdfm/plugin/dist
79
+ - ./@postdfm/transform/dist
80
+
81
+ compile-with-sourcemaps :
82
+ executor : node-executor
83
+ steps :
84
+ - checkout :
85
+ path : postdfm-with-sourcemaps
86
+
38
87
- restore_cache :
39
88
keys :
40
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
89
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-with-sourcemaps- {{ checksum "postdfm-with-sourcemaps/ yarn.lock" }}
41
90
42
- - run : yarn compile
91
+ - run :
92
+ command : yarn compile:map && yarn changed
93
+ working_directory : postdfm-with-sourcemaps
43
94
44
95
- persist_to_workspace :
45
- root : packages
96
+ root : postdfm-with-sourcemaps/ packages
46
97
paths :
47
98
- ./postdfm/dist
48
99
- ./@postdfm/ast/dist
@@ -55,142 +106,160 @@ jobs:
55
106
lint :
56
107
executor : node-executor
57
108
steps :
58
- - checkout
109
+ - checkout :
110
+ path : postdfm
111
+
59
112
- restore_cache :
60
113
keys :
61
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
114
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/ yarn.lock" }}
62
115
63
116
- attach_workspace :
64
- at : ~/repo /packages
117
+ at : postdfm /packages
65
118
66
- - run : yarn lint:check
119
+ - run :
120
+ command : yarn lint && yarn changed
121
+ working_directory : postdfm
67
122
68
123
format :
69
124
executor : node-executor
70
125
steps :
71
- - checkout
126
+ - checkout :
127
+ path : postdfm
128
+
72
129
- restore_cache :
73
130
keys :
74
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
131
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/ yarn.lock" }}
75
132
76
- - run : yarn format:check
133
+ - run :
134
+ command : yarn format && yarn changed
135
+ working_directory : postdfm
77
136
78
137
test :
79
138
executor : node-executor
80
139
steps :
81
- - checkout
140
+ - checkout :
141
+ path : postdfm-with-sourcemaps
142
+
82
143
- restore_cache :
83
144
keys :
84
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
145
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-with-sourcemaps- {{ checksum "postdfm-with-sourcemaps/ yarn.lock" }}
85
146
86
147
- attach_workspace :
87
- at : ~/repo/packages
148
+ at : postdfm-with-sourcemaps/packages
149
+
150
+ - run :
151
+ command : yarn test
152
+ working_directory : postdfm-with-sourcemaps
88
153
89
- - run : yarn test
154
+ - run :
155
+ command : yarn changed
156
+ working_directory : postdfm-with-sourcemaps
90
157
91
158
- store_test_results :
92
- path : ~/repo /packages/postdfm/results
159
+ path : postdfm-with-sourcemaps /packages/postdfm/results
93
160
94
161
- codecov/upload :
95
162
flags : " postdfm"
96
- file : ~/repo /packages/postdfm/results/lcov/coverage.info
163
+ file : postdfm-with-sourcemaps /packages/postdfm/results/lcov/coverage.info
97
164
98
165
- store_test_results :
99
- path : ~/repo /packages/@postdfm/ast/results
166
+ path : postdfm-with-sourcemaps /packages/@postdfm/ast/results
100
167
101
168
- codecov/upload :
102
169
flags : " @postdfm/ast"
103
- file : ~/repo /packages/@postdfm/ast/results/lcov/coverage.info
170
+ file : postdfm-with-sourcemaps /packages/@postdfm/ast/results/lcov/coverage.info
104
171
105
172
- store_test_results :
106
- path : ~/repo /packages/@postdfm/ast2dfm/results
173
+ path : postdfm-with-sourcemaps /packages/@postdfm/ast2dfm/results
107
174
108
175
- codecov/upload :
109
176
flags : " @postdfm/ast2dfm"
110
- file : ~/repo /packages/@postdfm/ast2dfm/results/lcov/coverage.info
177
+ file : postdfm-with-sourcemaps /packages/@postdfm/ast2dfm/results/lcov/coverage.info
111
178
112
179
- store_test_results :
113
- path : ~/repo /packages/@postdfm/dfm2ast/results
180
+ path : postdfm-with-sourcemaps /packages/@postdfm/dfm2ast/results
114
181
115
182
- codecov/upload :
116
183
flags : " @postdfm/dfm2ast"
117
- file : ~/repo /packages/@postdfm/dfm2ast/results/lcov/coverage.info
184
+ file : postdfm-with-sourcemaps /packages/@postdfm/dfm2ast/results/lcov/coverage.info
118
185
119
186
- store_test_results :
120
- path : ~/repo /packages/@postdfm/plugin/results
187
+ path : postdfm-with-sourcemaps /packages/@postdfm/plugin/results
121
188
122
189
- codecov/upload :
123
190
flags : " @postdfm/plugin"
124
- file : ~/repo /packages/@postdfm/plugin/results/lcov/coverage.info
191
+ file : postdfm-with-sourcemaps /packages/@postdfm/plugin/results/lcov/coverage.info
125
192
126
193
- store_test_results :
127
- path : ~/repo /packages/@postdfm/transform/results
194
+ path : postdfm-with-sourcemaps /packages/@postdfm/transform/results
128
195
129
196
- codecov/upload :
130
197
flags : " @postdfm/transform"
131
- file : ~/repo /packages/@postdfm/transform/results/lcov/coverage.info
198
+ file : postdfm-with-sourcemaps /packages/@postdfm/transform/results/lcov/coverage.info
132
199
133
200
docs :
134
201
executor : node-executor
135
202
steps :
136
- - checkout
203
+ - checkout :
204
+ path : postdfm
205
+
137
206
- restore_cache :
138
207
keys :
139
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
208
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/ yarn.lock" }}
140
209
141
210
- attach_workspace :
142
- at : ~/repo/packages
143
-
144
- - run : yarn docs
211
+ at : postdfm/packages
145
212
146
- # currently not used for anything
147
- # - persist_to_workspace:
148
- # root: docs
149
- # paths:
150
- # - ./*
213
+ - run :
214
+ command : yarn docs && yarn changed
215
+ working_directory : postdfm
151
216
152
217
release :
153
218
executor : node-executor
154
219
steps :
155
220
- checkout
156
221
- restore_cache :
157
222
keys :
158
- - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "yarn.lock" }}
223
+ - node-{{ .Environment.CACHE_VERSION }}-dependencies-{{ checksum "postdfm/ yarn.lock" }}
159
224
160
225
- attach_workspace :
161
- at : ~/repo /packages
226
+ at : postdfm /packages
162
227
163
- # currently not used for anything
164
- # - attach_workspace:
165
- # at: ~/repo/docs
166
-
167
- - run : yarn release
228
+ - run :
229
+ command : yarn release
230
+ working_directory : postdfm
168
231
169
232
- store_artifacts :
170
- path : ~/repo /dist
233
+ path : postdfm /dist
171
234
- store_artifacts :
172
- path : ~/repo /package.json
235
+ path : postdfm /package.json
173
236
- store_artifacts :
174
- path : ~/repo /packages/postdfm/package.json
237
+ path : postdfm /packages/postdfm/package.json
175
238
- store_artifacts :
176
- path : ~/repo /packages/@postdfm/ast/package.json
239
+ path : postdfm /packages/@postdfm/ast/package.json
177
240
- store_artifacts :
178
- path : ~/repo /packages/@postdfm/ast2dfm/package.json
241
+ path : postdfm /packages/@postdfm/ast2dfm/package.json
179
242
- store_artifacts :
180
- path : ~/repo /packages/@postdfm/dfm2ast/package.json
243
+ path : postdfm /packages/@postdfm/dfm2ast/package.json
181
244
- store_artifacts :
182
245
path : ~/repo/packages/@postdfm/plugin/package.json
183
246
- store_artifacts :
184
- path : ~/repo /packages/@postdfm/transform/package.json
247
+ path : postdfm /packages/@postdfm/transform/package.json
185
248
186
249
workflows :
187
250
version : 2
188
251
ci :
189
252
jobs :
190
253
- install
254
+ - install-with-sourcemaps :
255
+ requires :
256
+ - install
191
257
- compile :
192
258
requires :
193
259
- install
260
+ - compile-with-sourcemaps :
261
+ requires :
262
+ - install-with-sourcemaps
194
263
- format :
195
264
requires :
196
265
- install
@@ -199,7 +268,7 @@ workflows:
199
268
- compile
200
269
- test :
201
270
requires :
202
- - compile
271
+ - compile-with-sourcemaps
203
272
- docs :
204
273
requires :
205
274
- compile
@@ -209,3 +278,8 @@ workflows:
209
278
- format
210
279
- test
211
280
- docs
281
+ filters :
282
+ branches :
283
+ only :
284
+ - master
285
+ - beta
0 commit comments