2020 special-working-directory-relative : ' path with spaces'
2121
2222jobs :
23- build-vsix :
24- name : Create VSIX
25- runs-on : ubuntu-latest
26- steps :
27- - name : Checkout
28- uses : actions/checkout@v2
29-
30- - name : Build VSIX
31- uses : ./.github/actions/build-vsix
32- with :
33- node_version : ${{ env.NODE_VERSION}}
34- vsix_name : ${{ env.VSIX_NAME }}
35- artifact_name : ${{ env.ARTIFACT_NAME_VSIX }}
36-
37- lint :
38- name : Lint
39- runs-on : ubuntu-latest
40- steps :
41- - name : Checkout
42- 43-
44- - name : Lint
45- uses : ./.github/actions/lint
46- with :
47- node_version : ${{ env.NODE_VERSION }}
48-
49- check-types :
50- name : Check Python types
51- runs-on : ubuntu-latest
52- steps :
53- - name : Use Python ${{ env.PYTHON_VERSION }}
54- uses : actions/setup-python@v2
55- with :
56- python-version : ${{ env.PYTHON_VERSION }}
57-
58- - name : Checkout
59- 60-
61- - name : Install base Python requirements
62- uses : brettcannon/pip-secure-install@v1
63- with :
64- options : ' -t ./pythonFiles/lib/python --no-cache-dir --implementation py'
65-
66- - name : Install Jedi requirements
67- uses : brettcannon/pip-secure-install@v1
68- with :
69- requirements-file : ' ./pythonFiles/jedilsp_requirements/requirements.txt'
70- options : ' -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py'
71-
72- - name : Install other Python requirements
73- run : |
74- python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
75- python -m pip install --upgrade -r build/test-requirements.txt
76-
77- - name : Run Pyright
78- uses : jakebailey/pyright-action@v1
79- with :
80- working-directory : ' pythonFiles'
81-
8223 # ## Non-smoke tests
8324 tests :
8425 name : Tests
@@ -92,10 +33,10 @@ jobs:
9233 matrix :
9334 # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
9435 # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case.
95- os : [ubuntu-latest, windows-latest ]
36+ os : [ubuntu-latest]
9637 # Run the tests on the oldest and most recent versions of Python.
97- python : ['2.7', ' 3.x']
98- test-suite : [ts-unit, python-unit, venv, single-workspace, debugger, functional ]
38+ python : ['3.x']
39+ test-suite : [venv]
9940 exclude :
10041 # For fast PR turn-around, skip 2.7 under Windows.
10142 - os : windows-latest
@@ -297,213 +238,3 @@ jobs:
297238 - name : Run TypeScript functional tests
298239 run : npm run test:functional
299240 if : matrix.test-suite == 'functional'
300-
301- smoke-tests :
302- name : Smoke tests
303- # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded.
304- runs-on : ${{ matrix.os }}
305- needs : [build-vsix]
306- strategy :
307- fail-fast : false
308- matrix :
309- # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
310- # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
311- os : [ubuntu-latest, windows-latest]
312- steps :
313- # Need the source to have the tests available.
314- - name : Checkout
315- uses : actions/checkout@v2
316-
317- - name : Smoke tests
318- uses : ./.github/actions/smoke-tests
319- with :
320- node_version : ${{ env.NODE_VERSION }}
321- artifact_name : ${{ env.ARTIFACT_NAME_VSIX }}
322-
323- # ## Coverage run
324- coverage :
325- name : Coverage
326- # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded.
327- runs-on : ${{ matrix.os }}
328- strategy :
329- fail-fast : false
330- matrix :
331- # Only run coverage on linux for PRs
332- os : [ubuntu-latest]
333-
334- steps :
335- - name : Checkout
336- uses : actions/checkout@v2
337-
338- - name : Install Node
339- uses : actions/setup-node@v2
340- with :
341- node-version : ${{ env.NODE_VERSION }}
342- cache : ' npm'
343-
344- - name : Install dependencies (npm ci)
345- run : npm ci
346-
347- - name : Compile
348- run : npx gulp prePublishNonBundle
349-
350- - name : Use Python ${{ env.PYTHON_VERSION }}
351- uses : actions/setup-python@v2
352- with :
353- python-version : ${{ env.PYTHON_VERSION }}
354- cache : ' pip'
355- cache-dependency-path : |
356- requirements.txt
357- pythonFiles/jedilsp_requirements/requirements.txt
358- build/test-requirements.txt
359- build/functional-test-requirements.txt
360-
361- - name : Install base Python requirements
362- uses : brettcannon/pip-secure-install@v1
363- with :
364- options : ' -t ./pythonFiles/lib/python --implementation py'
365-
366- - name : Install Jedi requirements
367- uses : brettcannon/pip-secure-install@v1
368- with :
369- requirements-file : ' ./pythonFiles/jedilsp_requirements/requirements.txt'
370- options : ' -t ./pythonFiles/lib/jedilsp --implementation py'
371-
372- - name : Install debugpy
373- run : |
374- # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
375- python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy
376-
377- - name : Install test requirements
378- run : python -m pip install --upgrade -r build/test-requirements.txt
379-
380- - name : Install functional test requirements
381- run : python -m pip install --upgrade -r ./build/functional-test-requirements.txt
382-
383- - name : Prepare pipenv for venv tests
384- env :
385- TEST_FILES_SUFFIX : testvirtualenvs
386- PYTHON_VIRTUAL_ENVS_LOCATION : ' ./src/tmp/envPaths.json'
387- shell : pwsh
388- run : |
389- python -m pip install pipenv
390- python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath
391-
392- - name : Prepare poetry for venv tests
393- env :
394- TEST_FILES_SUFFIX : testvirtualenvs
395- shell : pwsh
396- run : |
397- python -m pip install poetry
398- Move-Item -Path ".\build\ci\pyproject.toml" -Destination .
399- poetry env use python
400-
401- - name : Prepare virtualenv for venv tests
402- env :
403- TEST_FILES_SUFFIX : testvirtualenvs
404- PYTHON_VIRTUAL_ENVS_LOCATION : ' ./src/tmp/envPaths.json'
405- shell : pwsh
406- run : |
407- python -m pip install virtualenv
408- python -m virtualenv .virtualenv/
409- if ('${{ matrix.os }}' -match 'windows-latest') {
410- & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath
411- } else {
412- & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath
413- }
414-
415- - name : Prepare venv for venv tests
416- env :
417- TEST_FILES_SUFFIX : testvirtualenvs
418- PYTHON_VIRTUAL_ENVS_LOCATION : ' ./src/tmp/envPaths.json'
419- shell : pwsh
420- run : |
421- python -m venv .venv
422- if ('${{ matrix.os }}' -match 'windows-latest') {
423- & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath
424- } else {
425- & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath
426- }
427-
428- - name : Prepare conda for venv tests
429- env :
430- TEST_FILES_SUFFIX : testvirtualenvs
431- PYTHON_VIRTUAL_ENVS_LOCATION : ' ./src/tmp/envPaths.json'
432- shell : pwsh
433- run : |
434- # 1. For `terminalActivation.testvirtualenvs.test.ts`
435- if ('${{ matrix.os }}' -match 'windows-latest') {
436- $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe
437- $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda
438- } else{
439- $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python
440- $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda
441- }
442- & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath
443- & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath
444- & $condaExecPath init --all
445-
446- - name : Run TypeScript unit tests
447- run : npm run test:unittests:cover
448-
449- - name : Run Python unit tests
450- run : |
451- python pythonFiles/tests/run_all.py
452-
453- # The virtual environment based tests use the `testSingleWorkspace` set of tests
454- # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`,
455- # which is set in the "Prepare environment for venv tests" step.
456- # We also use a third-party GitHub Action to install xvfb on Linux,
457- # run tests and then clean up the process once the tests ran.
458- # See https://github.com/GabrielBB/xvfb-action
459- - name : Run venv tests
460- env :
461- TEST_FILES_SUFFIX : testvirtualenvs
462- CI_PYTHON_VERSION : ${{ env.PYTHON_VERSION }}
463- CI_DISABLE_AUTO_SELECTION : 1
464- 465- with :
466- run : npm run testSingleWorkspace:cover
467-
468- - name : Run single-workspace tests
469- env :
470- CI_PYTHON_VERSION : ${{ env.PYTHON_VERSION }}
471- CI_DISABLE_AUTO_SELECTION : 1
472- 473- with :
474- run : npm run testSingleWorkspace:cover
475-
476- # Enable these tests when coverage is setup for multiroot workspace tests
477- # - name: Run multi-workspace tests
478- # env:
479- # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
480- # CI_DISABLE_AUTO_SELECTION: 1
481- # uses: GabrielBB/[email protected] 482- # with:
483- # run: npm run testMultiWorkspace:cover
484-
485- # Enable these tests when coverage is setup for debugger tests
486- # - name: Run debugger tests
487- # env:
488- # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
489- # CI_DISABLE_AUTO_SELECTION: 1
490- # uses: GabrielBB/[email protected] 491- # with:
492- # run: npm run testDebugger:cover
493-
494- # Run TypeScript functional tests
495- - name : Run TypeScript functional tests
496- env :
497- CI_PYTHON_VERSION : ${{ env.PYTHON_VERSION }}
498- CI_DISABLE_AUTO_SELECTION : 1
499- run : npm run test:functional:cover
500-
501- - name : Generate coverage reports
502- run : npm run test:cover:report
503-
504- - name : Upload HTML report
505- uses : actions/upload-artifact@v2
506- with :
507- name : ${{ runner.os }}-coverage-report-html
508- path : ./coverage
509- retention-days : 1
0 commit comments