4
4
push :
5
5
branches : master
6
6
pull_request :
7
- branches : " * "
7
+ branches : ' * '
8
8
9
9
jobs :
10
10
build_extensions :
11
11
runs-on : ${{ matrix.os }}
12
-
12
+
13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
16
16
example :
17
- - kernel-messaging
18
- - kernel-output
19
- - datagrid
20
- - documents
21
- - hello-world
22
- - signals
17
+ - codemirror-extension
23
18
- command-palette
24
19
- commands
20
+ - completer
21
+ - contentheader
25
22
- context-menu
26
- - launcher
27
23
- custom-log-console
24
+ - datagrid
25
+ - documents
26
+ - hello-world
27
+ - launcher
28
+ - kernel-messaging
29
+ - kernel-output
28
30
- log-messages
29
31
- main-menu
32
+ - metadata-form
33
+ - notifications
30
34
- react-widget
31
35
- settings
36
+ - signals
32
37
- state
33
38
- toolbar-button
34
39
- widgets
35
- - completer
36
- - contentheader
37
40
os : [ubuntu-latest, macos-latest, windows-latest]
38
41
39
42
defaults :
@@ -63,24 +66,23 @@ jobs:
63
66
- name : Check config files
64
67
if : steps.filter.outputs.extension == 'true'
65
68
run : |
69
+ diff ../hello-world/setup.py setup.py
66
70
diff ../hello-world/tsconfig.json tsconfig.json
67
- diff ../hello-world/.eslintignore .eslintignore
68
- diff ../hello-world/.eslintrc.js .eslintrc.js
69
- diff ../hello-world/.gitignore .gitignore
70
- diff ../hello-world/ui-tests/playwright.config.ts ./ui-tests/playwright.config.ts
71
- diff ../hello-world/ui-tests/README.md ./ui-tests/README.md
71
+ diff ../hello-world/.yarnrc.yml .yarnrc.yml
72
+ diff ../hello-world/ui-tests/jupyter_server_test_config.py ./ui-tests/jupyter_server_test_config.py
73
+ diff ../hello-world/ui-tests/playwright.config.js ./ui-tests/playwright.config.js
72
74
shell : bash
73
75
- name : Install node
74
76
if : steps.filter.outputs.extension == 'true'
75
77
uses : actions/setup-node@v3
76
78
with :
77
- node-version : " 18.x"
79
+ node-version : ' 18.x'
78
80
- name : Install Python
79
81
if : steps.filter.outputs.extension == 'true'
80
82
uses : actions/setup-python@v4
81
83
with :
82
- python-version : " 3.11"
83
- architecture : " x64"
84
+ python-version : ' 3.11'
85
+ architecture : ' x64'
84
86
- name : Get pip cache dir
85
87
if : steps.filter.outputs.extension == 'true'
86
88
id : pip-cache
@@ -92,13 +94,18 @@ jobs:
92
94
uses : actions/cache@v3
93
95
with :
94
96
path : ${{ steps.pip-cache.outputs.dir }}
95
- key : ${{ runner.os }}-pip-${{ hashFiles('**/ environment.yml') }}
97
+ key : ${{ runner.os }}-pip-${{ hashFiles('environment.yml') }}
96
98
restore-keys : |
97
99
${{ runner.os }}-pip-
98
100
- name : Install the Python dependencies
99
101
if : steps.filter.outputs.extension == 'true'
100
102
run : |
101
- python -m pip install --upgrade pip jupyter_packaging~=0.10 jupyterlab~=3.1
103
+ python -m pip install --upgrade pip "jupyterlab>=4.0.0"
104
+ # This is challenging to test in collaboration;
105
+ # got trouble with the file ID service and the uncontrolled auto-save
106
+ # - if: steps.filter.outputs.extension == 'true' && matrix.example == 'documents'
107
+ # run: |
108
+ # python -m pip install jupyter-collaboration
102
109
- name : Install the NPM dependencies
103
110
if : steps.filter.outputs.extension == 'true'
104
111
run : jlpm
@@ -111,30 +118,47 @@ jobs:
111
118
pip install . -v
112
119
jupyter labextension list 2>&1 | tee labextension.list
113
120
cat labextension.list | grep -ie "@jupyterlab-examples/*.*OK"
121
+ # There is a JavaScript warning as jupyter-collaboration is not
122
+ # installed. And therefore @jupyter/docprovider is not available.
114
123
python -m jupyterlab.browser_check
115
- pip uninstall -y $(python setup.py --name)
116
124
shell : bash
117
125
126
+ - name : Install galata
127
+ if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
128
+ working-directory : ${{ matrix.example }}/ui-tests
129
+ env :
130
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : 1
131
+ run : jlpm install
132
+ - name : Set up browser cache
133
+ if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
134
+ uses : actions/cache@v3
135
+ with :
136
+ path : |
137
+ ${{ github.workspace }}/pw-browsers
138
+ key : ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
139
+ - name : Install browser
140
+ if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
141
+ run : jlpm playwright install chromium
142
+ working-directory : ${{ matrix.example }}/ui-tests
143
+ - name : Install kernel-output dependencies
144
+ if : steps.filter.outputs.extension == 'true' && matrix.example == 'kernel-output'
145
+ run : pip install numpy pandas
118
146
- name : Integration tests
119
147
if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
120
- run : |
121
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down || true
122
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env pull -q || true
123
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
124
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
148
+ working-directory : ${{ matrix.example }}/ui-tests
149
+ run : jlpm playwright test
125
150
- name : Upload UI Test artifacts
126
151
if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux') && always()
127
152
uses : actions/upload-artifact@v3
128
153
with :
129
154
name : ui-test-output
130
155
path : |
131
156
${{ matrix.example }}/ui-tests/test-results
132
- - name : Stop containers
133
- if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux') && always( )
157
+ - name : Uninstall extension
158
+ if : steps.filter.outputs.extension == 'true' && ( startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') )
134
159
run : |
135
- # Print jupyterlab logs before removing the containers using the container name set in docker-compose file
136
- docker logs jupyterlab
137
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
160
+ export NAME=`python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])"`
161
+ pip uninstall -y ${NAME}
138
162
139
163
build_serverextension :
140
164
runs-on : ${{ matrix.os }}
@@ -166,22 +190,22 @@ jobs:
166
190
if : steps.filter.outputs.extension == 'true'
167
191
uses : actions/setup-node@v3
168
192
with :
169
- node-version : " 18.x"
193
+ node-version : ' 18.x'
170
194
- name : Check config files
171
195
if : steps.filter.outputs.extension == 'true'
172
196
run : |
197
+ diff hello-world/setup.py server-extension/setup.py
173
198
diff hello-world/tsconfig.json server-extension/tsconfig.json
174
- diff hello-world/.eslintignore server-extension/.eslintignore
175
- diff hello-world/.eslintrc.js server-extension/.eslintrc.js
176
- diff hello-world/ui-tests/playwright.config.ts server-extension/ui-tests/playwright.config.ts
177
- diff hello-world/ui-tests/README.md server-extension/ui-tests/README.md
199
+ diff hello-world/.yarnrc.yml server-extension/.yarnrc.yml
200
+ diff hello-world/ui-tests/jupyter_server_test_config.py server-extension/ui-tests/jupyter_server_test_config.py
201
+ diff hello-world/ui-tests/playwright.config.js server-extension/ui-tests/playwright.config.js
178
202
shell : bash
179
203
- name : Install Python
180
204
if : steps.filter.outputs.extension == 'true'
181
205
uses : actions/setup-python@v4
182
206
with :
183
- python-version : " 3.11"
184
- architecture : " x64"
207
+ python-version : ' 3.11'
208
+ architecture : ' x64'
185
209
- name : Get pip cache dir
186
210
if : steps.filter.outputs.extension == 'true'
187
211
id : pip-cache
@@ -193,13 +217,13 @@ jobs:
193
217
uses : actions/cache@v3
194
218
with :
195
219
path : ${{ steps.pip-cache.outputs.dir }}
196
- key : ${{ runner.os }}-pip-${{ hashFiles('**/ environment.yml') }}
220
+ key : ${{ runner.os }}-pip-${{ hashFiles('environment.yml') }}
197
221
restore-keys : |
198
222
${{ runner.os }}-pip-
199
223
- name : Install the Python dependencies
200
224
if : steps.filter.outputs.extension == 'true'
201
225
run : |
202
- python -m pip install --upgrade pip jupyter_packaging~=0.10 jupyterlab~=3.1
226
+ python -m pip install --upgrade pip jupyterlab~=4.0.0 build twine hatch
203
227
- name : Install the NPM dependencies
204
228
if : steps.filter.outputs.extension == 'true'
205
229
run : |
@@ -215,20 +239,20 @@ jobs:
215
239
# Force the usage of the source distribution (good practice)
216
240
run : |
217
241
cd server-extension
218
- python setup.py sdist
219
- pip install ./dist/jlab_ext_example * --pre --find-links=dist --no-cache-dir
242
+ python -m build -- sdist
243
+ pip install ./dist/jupyterlab_examples_server * --pre --find-links=dist --no-cache-dir
220
244
python -m jupyterlab.browser_check
221
245
- name : Check extension as dev
222
246
if : steps.filter.outputs.extension == 'true' && ( startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') )
223
247
run : |
224
248
jupyter server extension list 2>&1 | tee serverextension.list
225
- cat serverextension.list | grep -ie "jlab_ext_example .*OK"
249
+ cat serverextension.list | grep -ie "jupyterlab_examples_server .*OK"
226
250
jupyter labextension list 2>&1 | tee labextension.list
227
251
cat labextension.list | grep -ie "@jupyterlab-examples/server-extension.*OK"
228
252
- name : Clean extension installation
229
253
if : steps.filter.outputs.extension == 'true'
230
254
run : |
231
- pip uninstall -y jlab_ext_example
255
+ pip uninstall -y jupyterlab_examples_server
232
256
jupyter lab clean
233
257
jupyter server extension list
234
258
jupyter labextension list
@@ -241,33 +265,44 @@ jobs:
241
265
if : steps.filter.outputs.extension == 'true' && ( startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') )
242
266
run : |
243
267
jupyter server extension list 2>&1 | tee serverextension.list
244
- cat serverextension.list | grep -ie "jlab_ext_example .*OK"
268
+ cat serverextension.list | grep -ie "jupyterlab_examples_server .*OK"
245
269
jupyter labextension list 2>&1 | tee labextension.list
246
270
cat labextension.list | grep -ie "@jupyterlab-examples/server-extension.*OK"
247
271
python -m jupyterlab.browser_check
248
272
273
+ - name : Install galata
274
+ if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
275
+ working-directory : server-extension/ui-tests
276
+ env :
277
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : 1
278
+ run : jlpm install
279
+ - name : Set up browser cache
280
+ if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
281
+ uses : actions/cache@v3
282
+ with :
283
+ path : |
284
+ ${{ github.workspace }}/pw-browsers
285
+ key : ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
286
+ - name : Install browser
287
+ if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
288
+ run : jlpm playwright install chromium
289
+ working-directory : server-extension/ui-tests
249
290
- name : Integration tests
250
291
if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
251
- run : |
252
- cd server-extension
253
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down || true
254
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env pull -q || true
255
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
256
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
292
+ working-directory : server-extension/ui-tests
293
+ run : jlpm playwright test
257
294
- name : Upload UI Test artifacts
258
295
if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux') && always()
259
296
uses : actions/upload-artifact@v3
260
297
with :
261
298
name : ui-test-output
262
299
path : |
263
300
server-extension/ui-tests/test-results
264
- - name : Stop containers
265
- if : steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux') && always( )
301
+ - name : Uninstall extension
302
+ if : steps.filter.outputs.extension == 'true' && ( startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') )
266
303
run : |
267
- cd server-extension
268
- # Print jupyterlab logs before removing the containers using the container name set in docker-compose file
269
- docker logs jupyterlab
270
- docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
304
+ export NAME=`python -c "import tomllib; print(tomllib.load(open('server-extension/pyproject.toml', 'rb'))['project']['name'])"`
305
+ pip uninstall -y ${NAME}
271
306
272
307
build_all :
273
308
runs-on : ${{ matrix.os }}
@@ -290,12 +325,12 @@ jobs:
290
325
- name : Install node
291
326
uses : actions/setup-node@v3
292
327
with :
293
- node-version : " 18.x"
328
+ node-version : ' 18.x'
294
329
- name : Install Python
295
330
uses : actions/setup-python@v4
296
331
with :
297
- python-version : " 3.11"
298
- architecture : " x64"
332
+ python-version : ' 3.11'
333
+ architecture : ' x64'
299
334
- name : Get pip cache dir
300
335
id : pip-cache
301
336
run : |
@@ -305,17 +340,18 @@ jobs:
305
340
uses : actions/cache@v3
306
341
with :
307
342
path : ${{ steps.pip-cache.outputs.dir }}
308
- key : ${{ runner.os }}-pip-${{ hashFiles('**/ environment.yml') }}
343
+ key : ${{ runner.os }}-pip-${{ hashFiles('environment.yml') }}
309
344
restore-keys : |
310
345
${{ runner.os }}-pip-
311
346
- name : Install the Python dependencies
312
- run : python -m pip install jupyter_packaging~=0.10 jupyterlab~=3.1 pytest pytest-check-links
347
+ run : python -m pip install jupyterlab~=4.0.0 pytest pytest-check-links "pytest-jupyter[server]>=0.6.0"
313
348
- name : Bootstrap the jlpm deps
314
349
run : jlpm
315
350
- name : Build all the extensions
316
351
run : |
317
352
jlpm lint:check
318
- jlpm build-ext
319
- jlpm install-ext
353
+ lerna exec --concurrency 4 -- "touch yarn.lock"
354
+ # Needed to generate the _version.py files
355
+ jlpm run lerna exec --concurrency 4 -- "pip install -e ."
320
356
# Check links as last step as new tutorial may set links not yet valid (like file not yet in master)
321
- pytest --check-links
357
+ jlpm run lerna exec --concurrency 4 -- " pytest --check-links"
0 commit comments