@@ -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 : |
@@ -59,13 +59,12 @@ jobs:
59
59
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-lint-
60
60
61
61
- name : Set up Python and mamba
62
- uses : conda-incubator/setup-miniconda@v2
62
+ uses : conda-incubator/setup-miniconda@master
63
63
with :
64
- installer-url : ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
65
64
condarc-file : .github/.condarc
66
-
67
- - name : Install base conda dependencies
68
- run : mamba env update -n test --file requirements/github-actions.yml
65
+ environment-file : requirements/github-actions.yml
66
+ miniforge-variant : Mambaforge
67
+ use-mamba : true
69
68
70
69
- name : Install linting dependencies
71
70
run : mamba env update -n test --file requirements/lint.yml
@@ -78,15 +77,17 @@ jobs:
78
77
uses : actions/cache@v2
79
78
with :
80
79
path : ' **/node_modules'
81
- key : ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
80
+ key : |
81
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
82
82
83
83
- name : Cache yarn packages
84
84
id : cache-yarn-packages
85
85
if : steps.cache-node-modules.outputs.cache-hit != 'true'
86
- uses : actions/cache@v1
86
+ uses : actions/cache@v2
87
87
with :
88
88
path : .yarn-packages
89
- key : ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
89
+ key : |
90
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
90
91
restore-keys : |
91
92
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
92
93
${{ env.CACHE_EPOCH }}-yarn-
@@ -128,7 +129,7 @@ jobs:
128
129
nodejs : ' ${{ matrix.nodejs }}'
129
130
130
131
- name : Cache conda
131
- uses : actions/cache@v1
132
+ uses : actions/cache@v2
132
133
with :
133
134
path : ~/conda_pkgs_dir
134
135
key : |
@@ -137,10 +138,10 @@ jobs:
137
138
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-build-
138
139
139
140
- name : Set up Python and mamba
140
- uses : conda-incubator/setup-miniconda@v2
141
+ uses : conda-incubator/setup-miniconda@master
141
142
with :
142
- installer-url : ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
143
143
condarc-file : .github/.condarc
144
+ miniforge-variant : Mambaforge
144
145
145
146
- name : Install minimal build deps
146
147
shell : bash -l {0}
@@ -151,15 +152,17 @@ jobs:
151
152
uses : actions/cache@v2
152
153
with :
153
154
path : ' **/node_modules'
154
- key : ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
155
+ key : |
156
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
155
157
156
158
- name : Cache yarn packages
157
159
id : cache-yarn-packages
158
160
if : steps.cache-node-modules.outputs.cache-hit != 'true'
159
- uses : actions/cache@v1
161
+ uses : actions/cache@v2
160
162
with :
161
163
path : .yarn-packages
162
- key : ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
164
+ key : |
165
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
163
166
restore-keys : |
164
167
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
165
168
${{ env.CACHE_EPOCH }}-yarn-
@@ -230,11 +233,6 @@ jobs:
230
233
steps :
231
234
- uses : actions/checkout@v2
232
235
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
236
- name : Set JupyterLab and Node versions
239
237
uses : cschleiden/replace-tokens@v1
240
238
with :
@@ -246,7 +244,7 @@ jobs:
246
244
nodejs : ' ${{ matrix.nodejs }}'
247
245
248
246
- name : Cache conda
249
- uses : actions/cache@v1
247
+ uses : actions/cache@v2
250
248
with :
251
249
path : ~/conda_pkgs_dir
252
250
key : |
@@ -255,26 +253,12 @@ jobs:
255
253
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-${{ matrix.python }}-atest-
256
254
257
255
- name : Set up Python and mamba
258
- uses : conda-incubator/setup-miniconda@v2
256
+ uses : conda-incubator/setup-miniconda@master
259
257
with :
260
- installer-url : ${{ env.MAMBAFORGE_URL }}-${{ matrix.mambaforge }}
261
- python-version : ${{ matrix.python }}
262
258
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
259
+ environment-file : requirements/github-actions.yml
260
+ miniforge-variant : Mambaforge
261
+ use-mamba : true
278
262
279
263
- name : List all packages
280
264
run : conda list
@@ -284,22 +268,26 @@ jobs:
284
268
uses : actions/cache@v2
285
269
with :
286
270
path : ' **/node_modules'
287
- key : ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-test-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
271
+ key : |
272
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-atest-${{ hashFiles('yarn.lock') }}
288
273
289
274
- name : Cache yarn packages
290
275
id : cache-yarn-packages
291
276
if : steps.cache-node-modules.outputs.cache-hit != 'true'
292
- uses : actions/cache@v1
277
+ uses : actions/cache@v2
293
278
with :
294
279
path : .yarn-packages
295
- key : ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
280
+ key : |
281
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
296
282
restore-keys : |
297
283
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
298
284
${{ env.CACHE_EPOCH }}-yarn-
299
285
300
- - name : install npm dependencies
301
- if : steps.cache-node-modules.outputs.cache-hit != 'true'
302
- run : ${{ env.JLPM_CMD }}
286
+ - uses : actions/cache@v2
287
+ with :
288
+ path : ~/.julia/artifacts
289
+ key : |
290
+ ${{ env.CACHE_EPOCH }}-julia-test-${{ runner.os }}-${{ env.JULIA_LANGSERVER }}
303
291
304
292
- uses : actions/download-artifact@v2
305
293
with :
@@ -325,6 +313,16 @@ jobs:
325
313
- name : List frontend extensions
326
314
run : jupyter labextension list
327
315
316
+ - name : install node-based language servers
317
+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
318
+ run : ${{ env.JLPM_CMD }}
319
+
320
+ - name : Install Julia
321
+ uses : julia-actions/setup-julia@v1
322
+
323
+ - name : Install Julia language server
324
+ run : julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="LanguageServer", version="${{ env.JULIA_LANGSERVER }}"))'
325
+
328
326
- name : Run python tests
329
327
run : python scripts/utest.py
330
328
0 commit comments