@@ -16,17 +16,17 @@ defaults:
1616 shell : bash -l {0}
1717
1818env :
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
2422 PYTHONUNBUFFERED : 1
23+
2524 ATEST_RETRIES : 3
26- PIP_DISABLE_PIP_VERSION_CHECK : 1
25+ JLPM_CMD : jlpm --ignore-optional --prefer-offline --frozen-lockfile
2726
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 : 1
29+ JULIA_LANGSERVER : 3.2.0
3030
3131jobs :
3232 lint :
5050 nodejs : ' ${{ matrix.nodejs }}'
5151
5252 - name : Cache conda
53- uses : actions/cache@v1
53+ uses : actions/cache@v2
5454 with :
5555 path : ~/conda_pkgs_dir
5656 key : |
@@ -59,13 +59,12 @@ jobs:
5959 ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-lint-
6060
6161 - name : Set up Python and mamba
62- uses : conda-incubator/setup-miniconda@v2
62+ uses : conda-incubator/setup-miniconda@master
6363 with :
64- installer-url : ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
6564 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
6968
7069 - name : Install linting dependencies
7170 run : mamba env update -n test --file requirements/lint.yml
@@ -78,15 +77,17 @@ jobs:
7877 uses : actions/cache@v2
7978 with :
8079 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') }}
8282
8383 - name : Cache yarn packages
8484 id : cache-yarn-packages
8585 if : steps.cache-node-modules.outputs.cache-hit != 'true'
86- uses : actions/cache@v1
86+ uses : actions/cache@v2
8787 with :
8888 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') }}
9091 restore-keys : |
9192 ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
9293 ${{ env.CACHE_EPOCH }}-yarn-
@@ -128,7 +129,7 @@ jobs:
128129 nodejs : ' ${{ matrix.nodejs }}'
129130
130131 - name : Cache conda
131- uses : actions/cache@v1
132+ uses : actions/cache@v2
132133 with :
133134 path : ~/conda_pkgs_dir
134135 key : |
@@ -137,10 +138,10 @@ jobs:
137138 ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-build-
138139
139140 - name : Set up Python and mamba
140- uses : conda-incubator/setup-miniconda@v2
141+ uses : conda-incubator/setup-miniconda@master
141142 with :
142- installer-url : ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
143143 condarc-file : .github/.condarc
144+ miniforge-variant : Mambaforge
144145
145146 - name : Install minimal build deps
146147 shell : bash -l {0}
@@ -151,15 +152,17 @@ jobs:
151152 uses : actions/cache@v2
152153 with :
153154 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') }}
155157
156158 - name : Cache yarn packages
157159 id : cache-yarn-packages
158160 if : steps.cache-node-modules.outputs.cache-hit != 'true'
159- uses : actions/cache@v1
161+ uses : actions/cache@v2
160162 with :
161163 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') }}
163166 restore-keys : |
164167 ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
165168 ${{ env.CACHE_EPOCH }}-yarn-
@@ -230,11 +233,6 @@ jobs:
230233 steps :
231234 - uses : actions/checkout@v2
232235
233- - uses : julia-actions/setup-julia@v1
234-
235- - name : Install Julia language server
236- run : julia -e 'using Pkg; Pkg.add("LanguageServer")'
237-
238236 - name : Set JupyterLab and Node versions
239237 uses : cschleiden/replace-tokens@v1
240238 with :
@@ -246,7 +244,7 @@ jobs:
246244 nodejs : ' ${{ matrix.nodejs }}'
247245
248246 - name : Cache conda
249- uses : actions/cache@v1
247+ uses : actions/cache@v2
250248 with :
251249 path : ~/conda_pkgs_dir
252250 key : |
@@ -255,26 +253,12 @@ jobs:
255253 ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-${{ matrix.python }}-atest-
256254
257255 - name : Set up Python and mamba
258- uses : conda-incubator/setup-miniconda@v2
256+ uses : conda-incubator/setup-miniconda@master
259257 with :
260- installer-url : ${{ env.MAMBAFORGE_URL }}-${{ matrix.mambaforge }}
261- python-version : ${{ matrix.python }}
262258 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
278262
279263 - name : List all packages
280264 run : conda list
@@ -284,22 +268,26 @@ jobs:
284268 uses : actions/cache@v2
285269 with :
286270 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') }}
288273
289274 - name : Cache yarn packages
290275 id : cache-yarn-packages
291276 if : steps.cache-node-modules.outputs.cache-hit != 'true'
292- uses : actions/cache@v1
277+ uses : actions/cache@v2
293278 with :
294279 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') }}
296282 restore-keys : |
297283 ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
298284 ${{ env.CACHE_EPOCH }}-yarn-
299285
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 }}
303291
304292 - uses : actions/download-artifact@v2
305293 with :
@@ -325,6 +313,16 @@ jobs:
325313 - name : List frontend extensions
326314 run : jupyter labextension list
327315
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+
328326 - name : Run python tests
329327 run : python scripts/utest.py
330328
0 commit comments