@@ -16,17 +16,17 @@ defaults:
16
16
shell : bash -l {0}
17
17
18
18
env :
19
- # Increase this value to reset all caches
20
- CACHE_EPOCH : 0
21
-
22
- JLPM_CMD : jlpm --ignore-optional --prefer-offline --frozen-lockfile
23
-
19
+ JULIA_NUM_THREADS : 2
20
+ MAMBA_NO_BANNER : 1
21
+ PIP_DISABLE_PIP_VERSION_CHECK : 1
24
22
PYTHONUNBUFFERED : 1
23
+
25
24
ATEST_RETRIES : 3
26
- PIP_DISABLE_PIP_VERSION_CHECK : 1
25
+ JLPM_CMD : jlpm --ignore-optional --prefer-offline --frozen-lockfile
27
26
28
- # TODO: replace once mambaforge "just works" with setup-miniconda
29
- MAMBAFORGE_URL : https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge
27
+ # Increase this value to reset all caches
28
+ CACHE_EPOCH : 2
29
+ JULIA_LANGSERVER : 3.2.0
30
30
31
31
jobs :
32
32
lint :
50
50
nodejs : ' ${{ matrix.nodejs }}'
51
51
52
52
- name : Cache conda
53
- uses : actions/cache@v1
53
+ uses : actions/cache@v2
54
54
with :
55
55
path : ~/conda_pkgs_dir
56
56
key : |
61
61
- name : Set up Python and mamba
62
62
uses : conda-incubator/setup-miniconda@v2
63
63
with :
64
- installer-url : ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
65
- condarc-file : .github/.condarc
66
-
67
- - name : Install base conda dependencies
68
- run : mamba env update -n test --file requirements/github-actions.yml
64
+ environment-file : requirements/github-actions.yml
65
+ miniforge-variant : Mambaforge
66
+ use-mamba : true
69
67
70
68
- name : Install linting dependencies
71
69
run : mamba env update -n test --file requirements/lint.yml
@@ -78,15 +76,17 @@ jobs:
78
76
uses : actions/cache@v2
79
77
with :
80
78
path : ' **/node_modules'
81
- key : ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
79
+ key : |
80
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
82
81
83
82
- name : Cache yarn packages
84
83
id : cache-yarn-packages
85
84
if : steps.cache-node-modules.outputs.cache-hit != 'true'
86
- uses : actions/cache@v1
85
+ uses : actions/cache@v2
87
86
with :
88
87
path : .yarn-packages
89
- key : ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
88
+ key : |
89
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
90
90
restore-keys : |
91
91
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
92
92
${{ env.CACHE_EPOCH }}-yarn-
@@ -107,6 +107,9 @@ jobs:
107
107
- name : Lint frontend
108
108
run : jlpm lint:check
109
109
110
+ - name : Check distributions
111
+ run : python scripts/distcheck.py
112
+
110
113
build :
111
114
name : build
112
115
runs-on : ${{ matrix.os }}
@@ -128,7 +131,7 @@ jobs:
128
131
nodejs : ' ${{ matrix.nodejs }}'
129
132
130
133
- name : Cache conda
131
- uses : actions/cache@v1
134
+ uses : actions/cache@v2
132
135
with :
133
136
path : ~/conda_pkgs_dir
134
137
key : |
@@ -139,8 +142,7 @@ jobs:
139
142
- name : Set up Python and mamba
140
143
uses : conda-incubator/setup-miniconda@v2
141
144
with :
142
- installer-url : ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
143
- condarc-file : .github/.condarc
145
+ miniforge-variant : Mambaforge
144
146
145
147
- name : Install minimal build deps
146
148
shell : bash -l {0}
@@ -151,15 +153,17 @@ jobs:
151
153
uses : actions/cache@v2
152
154
with :
153
155
path : ' **/node_modules'
154
- key : ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
156
+ key : |
157
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
155
158
156
159
- name : Cache yarn packages
157
160
id : cache-yarn-packages
158
161
if : steps.cache-node-modules.outputs.cache-hit != 'true'
159
- uses : actions/cache@v1
162
+ uses : actions/cache@v2
160
163
with :
161
164
path : .yarn-packages
162
- key : ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
165
+ key : |
166
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
163
167
restore-keys : |
164
168
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
165
169
${{ env.CACHE_EPOCH }}-yarn-
@@ -210,15 +214,16 @@ jobs:
210
214
include :
211
215
# if using 3.6, use an old node
212
216
- python : 3.6
213
- # Node 10 end-of-life: April 2021
214
- nodejs : ' >=10,<11.0.0.a0'
215
- # if using 3.7, use newer node, etc...
216
- - python : 3.7
217
217
# Node 12 end-of-life: April 2022
218
218
nodejs : ' >=12,<13.0.0.a0'
219
- - python : 3.8
219
+ # if using 3.7, use newer node, etc...
220
+ - python : 3.7
220
221
# Node 14 end-of-life: April 2023
221
222
nodejs : ' >=14,<15.0.0.a0'
223
+ - python : 3.8
224
+ # TODO: switch to Node 16 once gets merged https://github.com/conda-forge/nodejs-feedstock/pull/189
225
+ # Node 15 end-of-life: June 2021
226
+ nodejs : ' >=15,<16.0.0.a0'
222
227
# TODO: remove when mambaforge just works on setup-miniconda
223
228
- os : ubuntu
224
229
mambaforge : Linux-x86_64.sh
@@ -230,11 +235,6 @@ jobs:
230
235
steps :
231
236
- uses : actions/checkout@v2
232
237
233
- - uses : julia-actions/setup-julia@v1
234
-
235
- - name : Install Julia language server
236
- run : julia -e 'using Pkg; Pkg.add("LanguageServer")'
237
-
238
238
- name : Set JupyterLab and Node versions
239
239
uses : cschleiden/replace-tokens@v1
240
240
with :
@@ -246,7 +246,7 @@ jobs:
246
246
nodejs : ' ${{ matrix.nodejs }}'
247
247
248
248
- name : Cache conda
249
- uses : actions/cache@v1
249
+ uses : actions/cache@v2
250
250
with :
251
251
path : ~/conda_pkgs_dir
252
252
key : |
@@ -257,24 +257,9 @@ jobs:
257
257
- name : Set up Python and mamba
258
258
uses : conda-incubator/setup-miniconda@v2
259
259
with :
260
- installer-url : ${{ env.MAMBAFORGE_URL }}-${{ matrix.mambaforge }}
261
- python-version : ${{ matrix.python }}
262
- condarc-file : .github/.condarc
263
-
264
- - name : Describe conda
265
- run : |
266
- conda info
267
- conda config --show-sources
268
- conda config --show
269
-
270
- - name : Install conda dependencies (unix)
271
- if : ${{ matrix.os != 'windows' }}
272
- run : mamba env update -n test --file requirements/github-actions.yml
273
-
274
- - name : Install conda dependencies (windows)
275
- if : ${{ matrix.os == 'windows' }}
276
- shell : cmd /C call {0}
277
- run : mamba env update -n test --file requirements/github-actions.yml
260
+ environment-file : requirements/github-actions.yml
261
+ miniforge-variant : Mambaforge
262
+ use-mamba : true
278
263
279
264
- name : List all packages
280
265
run : conda list
@@ -284,22 +269,26 @@ jobs:
284
269
uses : actions/cache@v2
285
270
with :
286
271
path : ' **/node_modules'
287
- key : ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-test-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
272
+ key : |
273
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-atest-${{ hashFiles('yarn.lock') }}
288
274
289
275
- name : Cache yarn packages
290
276
id : cache-yarn-packages
291
277
if : steps.cache-node-modules.outputs.cache-hit != 'true'
292
- uses : actions/cache@v1
278
+ uses : actions/cache@v2
293
279
with :
294
280
path : .yarn-packages
295
- key : ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
281
+ key : |
282
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
296
283
restore-keys : |
297
284
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
298
285
${{ env.CACHE_EPOCH }}-yarn-
299
286
300
- - name : install npm dependencies
301
- if : steps.cache-node-modules.outputs.cache-hit != 'true'
302
- run : ${{ env.JLPM_CMD }}
287
+ - uses : actions/cache@v2
288
+ with :
289
+ path : ~/.julia/artifacts
290
+ key : |
291
+ ${{ env.CACHE_EPOCH }}-julia-test-${{ runner.os }}-${{ env.JULIA_LANGSERVER }}
303
292
304
293
- uses : actions/download-artifact@v2
305
294
with :
@@ -313,11 +302,28 @@ jobs:
313
302
run : python -m pip check
314
303
315
304
- name : List server extensions
316
- run : jupyter server extension list
305
+ run : |
306
+ jupyter server extension list
307
+ jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
308
+
309
+ - name : List notebook server extensions
310
+ run : |
311
+ jupyter serverextension list
312
+ jupyter serverextension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
317
313
318
314
- name : List frontend extensions
319
315
run : jupyter labextension list
320
316
317
+ - name : install node-based language servers
318
+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
319
+ run : ${{ env.JLPM_CMD }}
320
+
321
+ - name : Install Julia
322
+ uses : julia-actions/setup-julia@v1
323
+
324
+ - name : Install Julia language server
325
+ run : julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="LanguageServer", version="${{ env.JULIA_LANGSERVER }}"))'
326
+
321
327
- name : Run python tests
322
328
run : python scripts/utest.py
323
329
@@ -382,3 +388,47 @@ jobs:
382
388
jupyter server extension list
383
389
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
384
390
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
391
+
392
+ source :
393
+ name : smoke source install ${{ matrix.os }}
394
+ runs-on : ${{ matrix.os }}-latest
395
+ needs : [build]
396
+ strategy :
397
+ fail-fast : false
398
+ matrix :
399
+ os : [ubuntu]
400
+ python : ['3.6']
401
+ nodejs : ['14']
402
+ lab : ['>=3.0.0,<4.0.0a0']
403
+ steps :
404
+ - name : Install Python
405
+ uses : actions/setup-python@v2
406
+ with :
407
+ python-version : ${{ matrix.python }}
408
+ architecture : ' x64'
409
+ - name : Setup Node
410
+ uses : actions/setup-node@v2
411
+ with :
412
+ node-version : ${{matrix.nodejs}}
413
+ - uses : actions/download-artifact@v2
414
+ with :
415
+ name : jupyterlab-lsp dist ${{ github.run_number }}
416
+ path : ./dist
417
+ - name : Install the prerequisites
418
+ run : python -m pip install pip wheel
419
+ - name : Install JupyterLab
420
+ shell : bash -l {0}
421
+ run : python -m pip install 'jupyterlab${{ matrix.lab }}'
422
+ - name : Install the server package
423
+ run : cd dist && python -m pip install -vv jupyter_lsp*.whl
424
+ - name : install the source extension
425
+ run : cd dist && jupyter labextension install krassowski-jupyterlab-lsp-*.tgz --log-level DEBUG
426
+ - name : Validate the install
427
+ run : |
428
+ set -eux
429
+ jupyter labextension list
430
+ jupyter server extension list
431
+ jupyter serverextension list
432
+ jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
433
+ jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
434
+ jupyter serverextension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
0 commit comments