Skip to content

Commit bdd49e3

Browse files
author
Kartik Raj
committed
Lets begin
1 parent db8f997 commit bdd49e3

File tree

3 files changed

+9
-274
lines changed

3 files changed

+9
-274
lines changed

.github/workflows/pr-check.yml

Lines changed: 3 additions & 272 deletions
Original file line numberDiff line numberDiff line change
@@ -20,65 +20,6 @@ env:
2020
special-working-directory-relative: 'path with spaces'
2121

2222
jobs:
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-
uses: actions/[email protected]
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-
uses: actions/[email protected]
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-
uses: GabrielBB/[email protected]
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-
uses: GabrielBB/[email protected]
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

src/client/common/configSettings.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,13 @@ export class PythonSettings implements IPythonSettings {
524524
public initialize(): void {
525525
const onDidChange = () => {
526526
const currentConfig = this.workspace.getConfiguration('python', this.workspaceRoot);
527+
console.log(`Before update [default]: ${this.defaultInterpreterPath}`);
528+
console.log(`Before update [python]: ${this.pythonPath}`);
529+
console.log(`Changed path [default]: ${currentConfig.get<string>('defaultInterpreterPath')}`);
530+
console.log('Inspect path [default]', JSON.stringify(currentConfig.inspect('defaultInterpreterPath')));
527531
this.update(currentConfig);
532+
console.log(`After update [default]: ${this.defaultInterpreterPath}`);
533+
console.log(`After update [python]: ${this.pythonPath}`);
528534

529535
// If workspace config changes, then we could have a cascading effect of on change events.
530536
// Let's defer the change notification.

src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ suite('Activation of Environments in Terminal', () => {
168168
if (process.env.CI_PYTHON_VERSION && process.env.CI_PYTHON_VERSION.startsWith('2.')) {
169169
this.skip();
170170
}
171-
// https://github.com/microsoft/vscode-python/issues/17666
172-
this.skip();
173171
await testActivation(envPaths.venvPath);
174172
});
175173
test('Should activate with pipenv', async function () {

0 commit comments

Comments
 (0)