Skip to content

Commit 05a3ccd

Browse files
author
Kartik Raj
committed
Only run multiroot test on ubunut
1 parent 6e302b7 commit 05a3ccd

File tree

1 file changed

+11
-212
lines changed

1 file changed

+11
-212
lines changed

.github/workflows/pr-check.yml

Lines changed: 11 additions & 212 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ jobs:
9292
matrix:
9393
# We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
9494
# macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case.
95-
os: [ubuntu-latest, windows-latest]
95+
os: [ubuntu-latest]
9696
# Run the tests on the oldest and most recent versions of Python.
9797
python: ['3.x']
98-
test-suite: [ts-unit, python-unit, venv, single-workspace, debugger, functional]
98+
test-suite: [multi-workspace]
9999

100100
steps:
101101
- name: Checkout
@@ -275,6 +275,15 @@ jobs:
275275
working-directory: ${{ env.special-working-directory }}
276276
if: matrix.test-suite == 'multi-workspace'
277277

278+
- name: Run multi-workspace tests
279+
env:
280+
CI_PYTHON_VERSION: ${{ matrix.python }}
281+
uses: GabrielBB/[email protected]
282+
with:
283+
run: npm run testMultiWorkspace
284+
working-directory: ${{ env.special-working-directory }}
285+
if: matrix.test-suite == 'multi-workspace'
286+
278287
- name: Run debugger tests
279288
env:
280289
CI_PYTHON_VERSION: ${{ matrix.python }}
@@ -288,213 +297,3 @@ jobs:
288297
- name: Run TypeScript functional tests
289298
run: npm run test:functional
290299
if: matrix.test-suite == 'functional'
291-
292-
smoke-tests:
293-
name: Smoke tests
294-
# The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded.
295-
runs-on: ${{ matrix.os }}
296-
needs: [build-vsix]
297-
strategy:
298-
fail-fast: false
299-
matrix:
300-
# We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
301-
# macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
302-
os: [ubuntu-latest, windows-latest]
303-
steps:
304-
# Need the source to have the tests available.
305-
- name: Checkout
306-
uses: actions/checkout@v3
307-
308-
- name: Smoke tests
309-
uses: ./.github/actions/smoke-tests
310-
with:
311-
node_version: ${{ env.NODE_VERSION }}
312-
artifact_name: ${{ env.ARTIFACT_NAME_VSIX }}
313-
314-
### Coverage run
315-
coverage:
316-
name: Coverage
317-
# The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded.
318-
runs-on: ${{ matrix.os }}
319-
strategy:
320-
fail-fast: false
321-
matrix:
322-
# Only run coverage on linux for PRs
323-
os: [ubuntu-latest]
324-
325-
steps:
326-
- name: Checkout
327-
uses: actions/checkout@v3
328-
329-
- name: Install Node
330-
uses: actions/setup-node@v3
331-
with:
332-
node-version: ${{ env.NODE_VERSION }}
333-
cache: 'npm'
334-
335-
- name: Install dependencies (npm ci)
336-
run: npm ci
337-
338-
- name: Compile
339-
run: npx gulp prePublishNonBundle
340-
341-
- name: Use Python ${{ env.PYTHON_VERSION }}
342-
uses: actions/setup-python@v4
343-
with:
344-
python-version: ${{ env.PYTHON_VERSION }}
345-
cache: 'pip'
346-
cache-dependency-path: |
347-
requirements.txt
348-
pythonFiles/jedilsp_requirements/requirements.txt
349-
build/test-requirements.txt
350-
build/functional-test-requirements.txt
351-
352-
- name: Install base Python requirements
353-
uses: brettcannon/pip-secure-install@v1
354-
with:
355-
options: '-t ./pythonFiles/lib/python --implementation py'
356-
357-
- name: Install Jedi requirements
358-
uses: brettcannon/pip-secure-install@v1
359-
with:
360-
requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt'
361-
options: '-t ./pythonFiles/lib/jedilsp --implementation py'
362-
363-
- name: Install debugpy
364-
run: |
365-
# 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.
366-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy
367-
368-
- name: Install test requirements
369-
run: python -m pip install --upgrade -r build/test-requirements.txt
370-
371-
- name: Install functional test requirements
372-
run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt
373-
374-
- name: Prepare pipenv for venv tests
375-
env:
376-
TEST_FILES_SUFFIX: testvirtualenvs
377-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
378-
shell: pwsh
379-
run: |
380-
python -m pip install pipenv
381-
python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath
382-
383-
- name: Prepare poetry for venv tests
384-
env:
385-
TEST_FILES_SUFFIX: testvirtualenvs
386-
shell: pwsh
387-
run: |
388-
python -m pip install poetry
389-
Move-Item -Path ".\build\ci\pyproject.toml" -Destination .
390-
poetry env use python
391-
392-
- name: Prepare virtualenv for venv tests
393-
env:
394-
TEST_FILES_SUFFIX: testvirtualenvs
395-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
396-
shell: pwsh
397-
run: |
398-
python -m pip install virtualenv
399-
python -m virtualenv .virtualenv/
400-
if ('${{ matrix.os }}' -match 'windows-latest') {
401-
& ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath
402-
} else {
403-
& ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath
404-
}
405-
406-
- name: Prepare venv for venv tests
407-
env:
408-
TEST_FILES_SUFFIX: testvirtualenvs
409-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
410-
shell: pwsh
411-
run: |
412-
python -m venv .venv
413-
if ('${{ matrix.os }}' -match 'windows-latest') {
414-
& ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath
415-
} else {
416-
& ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath
417-
}
418-
419-
- name: Prepare conda for venv tests
420-
env:
421-
TEST_FILES_SUFFIX: testvirtualenvs
422-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
423-
shell: pwsh
424-
run: |
425-
# 1. For `terminalActivation.testvirtualenvs.test.ts`
426-
if ('${{ matrix.os }}' -match 'windows-latest') {
427-
$condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe
428-
$condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda
429-
} else{
430-
$condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python
431-
$condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda
432-
}
433-
& $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath
434-
& $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath
435-
& $condaExecPath init --all
436-
437-
- name: Run TypeScript unit tests
438-
run: npm run test:unittests:cover
439-
440-
- name: Run Python unit tests
441-
run: |
442-
python pythonFiles/tests/run_all.py
443-
444-
# The virtual environment based tests use the `testSingleWorkspace` set of tests
445-
# with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`,
446-
# which is set in the "Prepare environment for venv tests" step.
447-
# We also use a third-party GitHub Action to install xvfb on Linux,
448-
# run tests and then clean up the process once the tests ran.
449-
# See https://github.com/GabrielBB/xvfb-action
450-
- name: Run venv tests
451-
env:
452-
TEST_FILES_SUFFIX: testvirtualenvs
453-
CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
454-
CI_DISABLE_AUTO_SELECTION: 1
455-
uses: GabrielBB/[email protected]
456-
with:
457-
run: npm run testSingleWorkspace:cover
458-
459-
- name: Run single-workspace tests
460-
env:
461-
CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
462-
CI_DISABLE_AUTO_SELECTION: 1
463-
uses: GabrielBB/[email protected]
464-
with:
465-
run: npm run testSingleWorkspace:cover
466-
467-
# Enable these tests when coverage is setup for multiroot workspace tests
468-
# - name: Run multi-workspace tests
469-
# env:
470-
# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
471-
# CI_DISABLE_AUTO_SELECTION: 1
472-
# uses: GabrielBB/[email protected]
473-
# with:
474-
# run: npm run testMultiWorkspace:cover
475-
476-
# Enable these tests when coverage is setup for debugger tests
477-
# - name: Run debugger 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 testDebugger:cover
484-
485-
# Run TypeScript functional tests
486-
- name: Run TypeScript functional tests
487-
env:
488-
CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
489-
CI_DISABLE_AUTO_SELECTION: 1
490-
run: npm run test:functional:cover
491-
492-
- name: Generate coverage reports
493-
run: npm run test:cover:report
494-
495-
- name: Upload HTML report
496-
uses: actions/upload-artifact@v3
497-
with:
498-
name: ${{ runner.os }}-coverage-report-html
499-
path: ./coverage
500-
retention-days: 1

0 commit comments

Comments
 (0)