27
27
matrix :
28
28
# We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
29
29
# macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
30
- os : [ubuntu-latest, windows-latest ]
31
- python : [3.6, 3.7, 3. 8]
32
- test-suite : [python-unit, functional-with-jupyter ]
30
+ os : [ubuntu-latest]
31
+ python : [3.8]
32
+ test-suite : [group1, group2, group3, group4 ]
33
33
steps :
34
34
- name : Checkout
35
35
uses : actions/checkout@v2
@@ -165,14 +165,305 @@ jobs:
165
165
- name : Publish Test Report
166
166
uses : scacap/action-surefire-report@v1
167
167
with :
168
- github_token : ${{ secrets.GITHUB_TOKEN }}
169
- report_paths : ${{ env.TEST_RESULTS_GLOB }}
168
+ github_token : ${{ secrets.GITHUB_TOKEN }}
169
+ report_paths : ${{ env.TEST_RESULTS_GLOB }}
170
170
check_name : Functional Test Report
171
171
if : (steps.test_functional.outcome == 'failure' || steps.test_functional_jupyter.outcome == 'failure') && failure()
172
172
173
- - name : Upload Functional Test Report
174
- uses : actions/upload-artifact@v2
173
+ testsInVSCode :
174
+ name : Tests in VS Code
175
+ runs-on : ${{ matrix.os }}
176
+ if : github.repository == 'microsoft/vscode-python'
177
+ strategy :
178
+ fail-fast : false
179
+ matrix :
180
+ # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
181
+ # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
182
+ os : [ubuntu-latest]
183
+ python : [3.8]
184
+ steps :
185
+ - name : Checkout
186
+ uses : actions/checkout@v2
187
+
188
+ - name : Use Python ${{matrix.python}}
189
+ uses : actions/setup-python@v2
190
+ with :
191
+ python-version : ${{matrix.python}}
192
+
193
+ - name : Upgrade pip
194
+ run : python -m pip install -U pip
195
+
196
+ - name : Use Node ${{env.NODE_VERSION}}
197
+
198
+ with :
199
+ node-version : ${{env.NODE_VERSION}}
200
+
201
+ # Start caching
202
+
203
+ # Cache Python Dependencies.
204
+ # Caching (https://github.com/actions/cache/blob/main/examples.md#python---pip
205
+ - name : Cache pip on linux
206
+ uses : actions/cache@v2
207
+ if : matrix.os == 'ubuntu-latest'
175
208
with :
176
- name : functional-jupyter-test-result-${{ matrix.os }}-${{ matrix.python }}
177
- path : ${{ env.TEST_RESULTS_GLOB }}
178
- if : steps.test_functional_jupyter.outcome == 'failure' && failure()
209
+ path : ~/.cache/pip
210
+ key : ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{ hashFiles('requirements.txt') }}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('test-requirements.txt')}}-${{hashFiles('ipython-test-requirements.txt')}}-${{hashFiles('functional-test-requirements.txt')}}-${{hashFiles('conda-functional-requirements.txt')}}
211
+ restore-keys : |
212
+ ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-
213
+
214
+ - name : Cache pip on mac
215
+ uses : actions/cache@v2
216
+ if : matrix.os == 'macos-latest'
217
+ with :
218
+ path : ~/Library/Caches/pip
219
+ key : ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{ hashFiles('requirements.txt') }}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('test-requirements.txt')}}-${{hashFiles('ipython-test-requirements.txt')}}-${{hashFiles('functional-test-requirements.txt')}}-${{hashFiles('conda-functional-requirements.txt')}}
220
+ restore-keys : |
221
+ ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-
222
+
223
+ - name : Cache pip on windows
224
+ uses : actions/cache@v2
225
+ if : matrix.os == 'windows-latest'
226
+ with :
227
+ path : ~\AppData\Local\pip\Cache
228
+ key : ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{ hashFiles('requirements.txt') }}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('test-requirements.txt')}}-${{hashFiles('ipython-test-requirements.txt')}}-${{hashFiles('functional-test-requirements.txt')}}-${{hashFiles('conda-functional-requirements.txt')}}
229
+ restore-keys : |
230
+ ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-
231
+
232
+ # Caching of npm packages (https://github.com/actions/cache/blob/main/examples.md#node---npm)
233
+ - name : Cache npm on linux/mac
234
+ uses : actions/cache@v2
235
+ if : matrix.os != 'windows-latest'
236
+ with :
237
+ path : ~/.npm
238
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
239
+ restore-keys : |
240
+ ${{ runner.os }}-node-
241
+
242
+ - name : Get npm cache directory
243
+ if : matrix.os == 'windows-latest'
244
+ id : npm-cache
245
+ run : |
246
+ echo "::set-output name=dir::$(npm config get cache)"
247
+ - name : Cache npm on windows
248
+ uses : actions/cache@v2
249
+ if : matrix.os == 'windows-latest'
250
+ with :
251
+ path : ${{ steps.npm-cache.outputs.dir }}
252
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
253
+ restore-keys : |
254
+ ${{ runner.os }}-node-
255
+
256
+ - name : Cache compiled TS files
257
+ id : out-cache
258
+ uses : actions/cache@v2
259
+ with :
260
+ path : ./out
261
+ key : ${{runner.os}}-${{env.CACHE_OUT_DIRECTORY}}-${{hashFiles('src/**')}}
262
+
263
+ # For faster/better builds of sdists.
264
+ - run : python -m pip install wheel
265
+ shell : bash
266
+
267
+ # debugpy is not shipped, only installed for local tests.
268
+ # In production, we get debugpy from python extension.
269
+ - name : Install functional test requirements
270
+ run : |
271
+ python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements.txt
272
+ python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
273
+ python ./pythonFiles/install_debugpy.py
274
+ python -m pip install numpy
275
+ python -m pip install --upgrade jupyter
276
+ python -m pip install --upgrade -r build/test-requirements.txt
277
+ python -m pip install --upgrade -r ./build/ipython-test-requirements.txt
278
+ python -m pip install --upgrade -r ./build/conda-functional-requirements.txt
279
+ python -m ipykernel install --user
280
+ # This step is slow.
281
+
282
+ - name : Install dependencies (npm ci)
283
+ run : npm ci --prefer-offline
284
+ # This step is slow.
285
+
286
+ - name : Compile if not cached
287
+ run : npx gulp prePublishNonBundle
288
+
289
+
290
+ - name : Install Julia
291
+ uses : julia-actions/setup-julia@v1
292
+ with :
293
+ version : 1.5.2
294
+
295
+ - name : Install Jualia Kernel
296
+ run : |
297
+ julia -e '
298
+ using Pkg
299
+ Pkg.add("IJulia")'
300
+
301
+ - name : Run VSCode tests
302
+
303
+ with :
304
+ run : npm run testDataScienceInVSCode
305
+ env :
306
+ DISPLAY : 10
307
+ VSCODE_PYTHON_ROLLING : 1
308
+ VSC_PYTHON_FORCE_LOGGING : 1
309
+ VSC_PYTHON_CI_NON_PYTHON_NB_TEST : 1
310
+ VSC_PYTHON_LOAD_EXPERIMENTS_FROM_FILE : ' true'
311
+ id : test_functional
312
+
313
+ - name : Publish Test Report
314
+ uses : scacap/action-surefire-report@v1
315
+ with :
316
+ github_token : ${{ secrets.GITHUB_TOKEN }}
317
+ report_paths : ${{ env.TEST_RESULTS_GLOB }}
318
+ check_name : VSCode Test Report
319
+ if : steps.test_functional.outcome == 'failure' && failure()
320
+
321
+
322
+ # testsInVSCodeInsiders:
323
+ # name: Tests in VS Code Insiders
324
+ # runs-on: ${{ matrix.os }}
325
+ # if: github.repository == 'microsoft/vscode-python'
326
+ # strategy:
327
+ # fail-fast: false
328
+ # matrix:
329
+ # # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
330
+ # # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
331
+ # os: [ubuntu-latest]
332
+ # python: [3.8]
333
+ # steps:
334
+ # - name: Checkout
335
+ # uses: actions/checkout@v2
336
+
337
+ # - name: Use Python ${{matrix.python}}
338
+ # uses: actions/setup-python@v2
339
+ # with:
340
+ # python-version: ${{matrix.python}}
341
+
342
+ # - name: Upgrade pip
343
+ # run: python -m pip install -U pip
344
+
345
+ # - name: Use Node ${{env.NODE_VERSION}}
346
+
347
+ # with:
348
+ # node-version: ${{env.NODE_VERSION}}
349
+
350
+ # # Start caching
351
+
352
+ # # Cache Python Dependencies.
353
+ # # Caching (https://github.com/actions/cache/blob/main/examples.md#python---pip
354
+ # - name: Cache pip on linux
355
+ # uses: actions/cache@v2
356
+ # if: matrix.os == 'ubuntu-latest'
357
+ # with:
358
+ # path: ~/.cache/pip
359
+ # key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{ hashFiles('requirements.txt') }}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('test-requirements.txt')}}-${{hashFiles('ipython-test-requirements.txt')}}-${{hashFiles('functional-test-requirements.txt')}}-${{hashFiles('conda-functional-requirements.txt')}}
360
+ # restore-keys: |
361
+ # ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-
362
+
363
+ # - name: Cache pip on mac
364
+ # uses: actions/cache@v2
365
+ # if: matrix.os == 'macos-latest'
366
+ # with:
367
+ # path: ~/Library/Caches/pip
368
+ # key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{ hashFiles('requirements.txt') }}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('test-requirements.txt')}}-${{hashFiles('ipython-test-requirements.txt')}}-${{hashFiles('functional-test-requirements.txt')}}-${{hashFiles('conda-functional-requirements.txt')}}
369
+ # restore-keys: |
370
+ # ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-
371
+
372
+ # - name: Cache pip on windows
373
+ # uses: actions/cache@v2
374
+ # if: matrix.os == 'windows-latest'
375
+ # with:
376
+ # path: ~\AppData\Local\pip\Cache
377
+ # key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{ hashFiles('requirements.txt') }}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('test-requirements.txt')}}-${{hashFiles('ipython-test-requirements.txt')}}-${{hashFiles('functional-test-requirements.txt')}}-${{hashFiles('conda-functional-requirements.txt')}}
378
+ # restore-keys: |
379
+ # ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-
380
+
381
+ # # Caching of npm packages (https://github.com/actions/cache/blob/main/examples.md#node---npm)
382
+ # - name: Cache npm on linux/mac
383
+ # uses: actions/cache@v2
384
+ # if: matrix.os != 'windows-latest'
385
+ # with:
386
+ # path: ~/.npm
387
+ # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
388
+ # restore-keys: |
389
+ # ${{ runner.os }}-node-
390
+
391
+ # - name: Get npm cache directory
392
+ # if: matrix.os == 'windows-latest'
393
+ # id: npm-cache
394
+ # run: |
395
+ # echo "::set-output name=dir::$(npm config get cache)"
396
+ # - name: Cache npm on windows
397
+ # uses: actions/cache@v2
398
+ # if: matrix.os == 'windows-latest'
399
+ # with:
400
+ # path: ${{ steps.npm-cache.outputs.dir }}
401
+ # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
402
+ # restore-keys: |
403
+ # ${{ runner.os }}-node-
404
+
405
+ # - name: Cache compiled TS files
406
+ # id: out-cache
407
+ # uses: actions/cache@v2
408
+ # with:
409
+ # path: ./out
410
+ # key: ${{runner.os}}-${{env.CACHE_OUT_DIRECTORY}}-${{hashFiles('src/**')}}
411
+
412
+ # # For faster/better builds of sdists.
413
+ # - run: python -m pip install wheel
414
+ # shell: bash
415
+
416
+ # # debugpy is not shipped, only installed for local tests.
417
+ # # In production, we get debugpy from python extension.
418
+ # - name: Install functional test requirements
419
+ # run: |
420
+ # python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements.txt
421
+ # python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
422
+ # python ./pythonFiles/install_debugpy.py
423
+ # python -m pip install numpy
424
+ # python -m pip install --upgrade jupyter
425
+ # python -m pip install --upgrade -r build/test-requirements.txt
426
+ # python -m pip install --upgrade -r ./build/ipython-test-requirements.txt
427
+ # python -m pip install --upgrade -r ./build/conda-functional-requirements.txt
428
+ # python -m ipykernel install --user
429
+ # # This step is slow.
430
+
431
+ # - name: Install dependencies (npm ci)
432
+ # run: npm ci --prefer-offline
433
+ # # This step is slow.
434
+
435
+ # - name: Compile if not cached
436
+ # run: npx gulp prePublishNonBundle
437
+
438
+ # - name: Install Julia
439
+ # uses: julia-actions/setup-julia@v1
440
+ # with:
441
+ # version: 1.5.2
442
+
443
+ # - name: Install Jualia Kernel
444
+ # run: |
445
+ # julia -e '
446
+ # using Pkg
447
+ # Pkg.add("IJulia")'
448
+
449
+ # - name: Run VSCode tests
450
+ # uses: GabrielBB/[email protected]
451
+ # with:
452
+ # run: npm run testDataScience
453
+ # env:
454
+ # DISPLAY: 10
455
+ # VSCODE_PYTHON_ROLLING: 1
456
+ # VSC_PYTHON_FORCE_LOGGING: 1
457
+ # VSC_PYTHON_CI_NON_PYTHON_NB_TEST: 1
458
+ # VSC_PYTHON_CI_TEST_VSC_CHANNEL: 'insiders'
459
+ # VSC_PYTHON_LOAD_EXPERIMENTS_FROM_FILE: 'true'
460
+ # id: test_functional
461
+
462
+ # - name: Publish Test Report
463
+ # uses: scacap/action-surefire-report@v1
464
+ # with:
465
+ # github_token: ${{ secrets.GITHUB_TOKEN }}
466
+ # report_paths: ${{ env.TEST_RESULTS_GLOB }}
467
+ # check_name: VSCode Test Report
468
+ # if: steps.test_functional.outcome == 'failure' && failure()
469
+
0 commit comments