11name : lint-test-build
2- on :
3- push :
4- branches : [develop]
5- pull_request :
2+ on : [push]
63
74permissions :
85 contents : read
96
107jobs :
11- download-datasets :
12- runs-on : ubuntu-latest
13- steps :
14- - uses : actions/checkout@v4
15- with :
16- lfs : true
17- submodules : true
18- - uses : actions/cache@v4
19- with :
20- path : datasets
21- key : datasets-${{ hashFiles('datasets/**') }}
22- - run : datasets/populate
23-
24- lint-lib :
25- runs-on : ubuntu-latest
26- steps :
27- - uses : actions/checkout@v4
28- - uses : actions/setup-node@v4
29- with :
30- node-version-file : .nvmrc
31- cache : npm
32- - run : npm ci
33- - run : npm --workspace=discojs run lint
34-
35- lint-lib-node :
36- needs : build-lib
37- runs-on : ubuntu-latest
38- steps :
39- - uses : actions/checkout@v4
40- - uses : actions/setup-node@v4
41- with :
42- node-version-file : .nvmrc
43- cache : npm
44- - run : npm ci
45- - run : npm --workspace=discojs run build
46- - run : npm --workspace=discojs-node run lint
47-
48- lint-lib-web :
49- needs : build-lib
50- runs-on : ubuntu-latest
51- steps :
52- - uses : actions/checkout@v4
53- - uses : actions/setup-node@v4
54- with :
55- node-version-file : .nvmrc
56- cache : npm
57- - run : npm ci
58- - run : npm --workspace=discojs run build
59- - run : npm --workspace=discojs-web run lint
60-
61- lint-server :
62- needs : [build-lib, build-lib-node]
63- runs-on : ubuntu-latest
64- steps :
65- - uses : actions/checkout@v4
66- - uses : actions/setup-node@v4
67- with :
68- node-version-file : .nvmrc
69- cache : npm
70- - run : npm ci
71- - run : npm --workspace={discojs,discojs-node} run build
72- - run : npm --workspace=server run lint
73-
74- lint-cli :
75- needs : [build-lib, build-lib-node, build-server]
76- runs-on : ubuntu-latest
77- steps :
78- - uses : actions/checkout@v4
79- - uses : actions/setup-node@v4
80- with :
81- node-version-file : .nvmrc
82- cache : npm
83- - run : npm ci
84- - run : npm --workspace={discojs,discojs-node,server} run build
85- - run : npm --workspace=cli run lint
86-
87- lint-webapp :
88- needs : [build-lib, build-lib-web]
89- runs-on : ubuntu-latest
90- steps :
91- - uses : actions/checkout@v4
92- - uses : actions/setup-node@v4
93- with :
94- node-version-file : .nvmrc
95- cache : npm
96- - run : npm ci
97- - run : npm --workspace={discojs,discojs-web} run build
98- - run : npm --workspace=webapp run lint
99-
100- lint-docs-examples :
101- needs : [build-lib, build-lib-node, build-server]
102- runs-on : ubuntu-latest
103- steps :
104- - uses : actions/checkout@v4
105- - uses : actions/setup-node@v4
106- with :
107- node-version-file : .nvmrc
108- cache : npm
109- - run : npm ci
110- - run : npm --workspace={discojs,discojs-node,server} run build
111- - run : npm run lint
112- working-directory : docs/examples
113-
114- build-lib :
115- runs-on : ubuntu-latest
116- steps :
117- - uses : actions/checkout@v4
118- - uses : actions/setup-node@v4
119- with :
120- node-version-file : .nvmrc
121- cache : npm
122- - run : npm ci
123- - run : npm --workspace=discojs run build
124-
125- build-lib-node :
126- needs : build-lib
127- runs-on : ubuntu-latest
128- steps :
129- - uses : actions/checkout@v4
130- - uses : actions/setup-node@v4
131- with :
132- node-version-file : .nvmrc
133- cache : npm
134- - run : npm ci
135- - run : npm --workspace=discojs run build
136- - run : npm --workspace=discojs-node run build
137-
138- build-lib-web :
139- needs : build-lib
140- runs-on : ubuntu-latest
141- steps :
142- - uses : actions/checkout@v4
143- - uses : actions/setup-node@v4
144- with :
145- node-version-file : .nvmrc
146- cache : npm
147- - run : npm ci
148- - run : npm run --workspace=discojs build
149- - run : npm run --workspace=discojs-web build
150-
151- build-server :
152- needs : [build-lib, build-lib-node]
153- runs-on : ubuntu-latest
154- steps :
155- - uses : actions/checkout@v4
156- - uses : actions/setup-node@v4
157- with :
158- node-version-file : .nvmrc
159- cache : npm
160- - run : npm ci
161- - run : npm run --workspace={discojs,discojs-node} build
162- - run : npm run --workspace=server build
163-
164- build-server-docker :
165- needs : build-server
166- runs-on : ubuntu-latest
167- steps :
168- - uses : actions/checkout@v4
169- - uses : docker/setup-buildx-action@v3
170- with :
171- install : true
172- - run : docker build .
173- - run : |
174- docker build --quiet --load . | \
175- xargs docker run --detach --publish 8080:8080
176- timeout=120
177- while ! curl http://localhost:8080
178- do
179- [ $timeout -eq 0 ] && exit 1
180- sleep 1
181- timeout=$((timeout - 1))
182- done
183-
1848 build-cli :
185- needs : [build-lib, build-lib-node, build-server]
1869 runs-on : ubuntu-latest
18710 steps :
18811 - uses : actions/checkout@v4
@@ -194,141 +17,7 @@ jobs:
19417 - run : npm run --workspace={discojs,discojs-node,server} build
19518 - run : npm run --workspace=cli build
19619
197- build-webapp :
198- needs : [build-lib, build-lib-web]
199- runs-on : ubuntu-latest
200- steps :
201- - uses : actions/checkout@v4
202- - uses : actions/setup-node@v4
203- with :
204- node-version-file : .nvmrc
205- cache : npm
206- - run : npm ci
207- - run : npm --workspace={discojs,discojs-web} run build
208- - run : npm --workspace=webapp run build
209-
210- build-docs-examples :
211- needs : [build-lib, build-lib-node, build-server]
212- runs-on : ubuntu-latest
213- steps :
214- - uses : actions/checkout@v4
215- - uses : actions/setup-node@v4
216- with :
217- node-version-file : .nvmrc
218- cache : npm
219- - run : npm ci
220- - run : npm --workspace={discojs,discojs-node,server} run build
221- - run : npm run build
222- working-directory : docs/examples
223-
224- test-lib :
225- needs : [build-lib, download-datasets]
226- runs-on : ubuntu-latest
227- steps :
228- - uses : actions/checkout@v4
229- with :
230- lfs : true
231- submodules : true
232- - uses : actions/cache@v4
233- with :
234- path : datasets
235- key : datasets-${{ hashFiles('datasets/**') }}
236- - uses : actions/setup-node@v4
237- with :
238- node-version-file : .nvmrc
239- cache : npm
240- - run : npm ci
241- - run : npm --workspace=discojs test
242-
243- test-lib-node :
244- needs : [build-lib, download-datasets]
245- runs-on : ubuntu-latest
246- steps :
247- - uses : actions/checkout@v4
248- with :
249- lfs : true
250- submodules : true
251- - uses : actions/cache@v4
252- with :
253- path : datasets
254- key : datasets-${{ hashFiles('datasets/**') }}
255- - uses : actions/setup-node@v4
256- with :
257- node-version-file : .nvmrc
258- cache : npm
259- - run : npm ci
260- - run : npm --workspace=discojs run build
261- - run : npm --workspace=discojs-node test
262-
263- test-lib-web :
264- needs : [build-lib]
265- runs-on : ubuntu-latest
266- steps :
267- - uses : actions/checkout@v4
268- with :
269- lfs : true
270- submodules : true
271- - uses : actions/cache@v4
272- with :
273- path : datasets
274- key : datasets-${{ hashFiles('datasets/**') }}
275- - uses : actions/setup-node@v4
276- with :
277- node-version-file : .nvmrc
278- cache : npm
279- - run : npm ci
280- - run : npm --workspace=discojs run build
281- - run : npm --workspace=discojs-web test
282-
283- test-server :
284- needs : [build-lib, build-lib-node, download-datasets]
285- runs-on : ubuntu-latest
286- steps :
287- - uses : actions/checkout@v4
288- with :
289- lfs : true
290- submodules : true
291- - uses : actions/cache@v4
292- with :
293- path : datasets
294- key : datasets-${{ hashFiles('datasets/**') }}
295- - uses : actions/setup-node@v4
296- with :
297- node-version-file : .nvmrc
298- cache : npm
299- - run : npm ci
300- - run : npm --workspace={discojs,discojs-node} run build
301- - run : npm --workspace=server test
302-
303- test-webapp :
304- needs : [build-lib, build-lib-web, download-datasets]
305- runs-on : ubuntu-latest
306- steps :
307- - uses : actions/checkout@v4
308- with :
309- lfs : true
310- submodules : true
311- - uses : actions/cache@v4
312- with :
313- path : datasets
314- key : datasets-${{ hashFiles('datasets/**') }}
315- - uses : actions/setup-node@v4
316- with :
317- node-version-file : .nvmrc
318- cache : npm
319- - run : npm ci
320- - run : npm --workspace={discojs,discojs-web} run build
321- - run : npm --workspace=webapp run test:unit
322- - uses : cypress-io/github-action@v6
323- with :
324- working-directory : webapp
325- install : false
326- start : npm start
327- env :
328- VITE_SERVER_URL : http://server
329-
33020 test-cli :
331- needs : [build-lib, build-lib-node, build-server, download-datasets]
33221 runs-on : ubuntu-latest
33322 steps :
33423 - uses : actions/checkout@v4
@@ -346,24 +35,3 @@ jobs:
34635 - run : npm ci
34736 - run : npm --workspace={discojs,discojs-node,server} run build
34837 - run : npm --workspace=cli start -- -t cifar10 -u 3 -e 1 -r 1
349-
350- test-docs-examples :
351- needs : [build-lib, build-lib-node, build-server, download-datasets]
352- runs-on : ubuntu-latest
353- steps :
354- - uses : actions/checkout@v4
355- with :
356- lfs : true
357- submodules : true
358- - uses : actions/cache@v4
359- with :
360- path : datasets
361- key : datasets-${{ hashFiles('datasets/**') }}
362- - uses : actions/setup-node@v4
363- with :
364- node-version-file : .nvmrc
365- cache : npm
366- - run : npm ci
367- - run : npm --workspace={discojs,discojs-node,server} run build
368- - run : npm run test
369- working-directory : docs/examples
0 commit comments