From d1aa62c9ed70b4bdf021ea56b92accd90f052fe3 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 6 Sep 2023 13:03:14 -0700 Subject: [PATCH 1/3] Add action --- .github/workflows/add-milestone.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/add-milestone.yml diff --git a/.github/workflows/add-milestone.yml b/.github/workflows/add-milestone.yml new file mode 100644 index 000000000000..f56a5fb96880 --- /dev/null +++ b/.github/workflows/add-milestone.yml @@ -0,0 +1,27 @@ +name: "Add milestone to closed issue" +on: + issues: + types: [closed, reopened] + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions + uses: actions/checkout@v3 + with: + repository: "karrtikr/vscode-github-triage-actions" + ref: stable + path: ./actions + - name: Checkout Repo + if: github.event_name != 'issues' + uses: actions/checkout@v3 + with: + path: ./repo + fetch-depth: 0 + - name: Install Actions + run: npm install --production --prefix ./actions + - name: "Add milestone to closed issue" + uses: ./actions/python-add-milestone + with: + token: ${{secrets.GITHUB_TOKEN}} From f9bf27c1fb071833bd9d2351465f5392edf1ec70 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 6 Sep 2023 13:24:40 -0700 Subject: [PATCH 2/3] Dfdf (#41) * sdf * sdf * dfgd * d --- .github/workflows/add-milestone.yml | 2 - .github/workflows/build.yml | 299 ------------------ .../virtualEnvs/virtualEnvPrompt.ts | 1 + 3 files changed, 1 insertion(+), 301 deletions(-) diff --git a/.github/workflows/add-milestone.yml b/.github/workflows/add-milestone.yml index f56a5fb96880..ff307e66ed26 100644 --- a/.github/workflows/add-milestone.yml +++ b/.github/workflows/add-milestone.yml @@ -23,5 +23,3 @@ jobs: run: npm install --production --prefix ./actions - name: "Add milestone to closed issue" uses: ./actions/python-add-milestone - with: - token: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 873b81fa66f8..03eb5435d82e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,302 +41,3 @@ jobs: vsix_type = "release" print(f"::set-output name=vsix_name::ms-python-{vsix_type}.vsix") print(f"::set-output name=vsix_artifact_name::ms-python-{vsix_type}-vsix") - - build-vsix: - name: Create VSIX - if: github.repository == 'microsoft/vscode-python' - needs: setup - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Build VSIX - uses: ./.github/actions/build-vsix - with: - node_version: ${{ env.NODE_VERSION }} - vsix_name: ${{ needs.setup.outputs.vsix_name }} - artifact_name: ${{ needs.setup.outputs.vsix_artifact_name }} - - lint: - name: Lint - if: github.repository == 'microsoft/vscode-python' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Lint - uses: ./.github/actions/lint - with: - node_version: ${{ env.NODE_VERSION }} - - check-types: - name: Check Python types - if: github.repository == 'microsoft/vscode-python' - runs-on: ubuntu-latest - steps: - - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install core Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./pythonFiles/lib/python --no-cache-dir --implementation py' - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt' - options: '-t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py' - - - name: Install other Python requirements - run: | - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - python -m pip install --upgrade -r build/test-requirements.txt - - - name: Run Pyright - uses: jakebailey/pyright-action@v1 - with: - version: 1.1.308 - working-directory: 'pythonFiles' - - ### Non-smoke tests - tests: - name: Tests - if: github.repository == 'microsoft/vscode-python' - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: ${{ env.special-working-directory }} - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix - # entry to lower the number of runners used, macOS runners are expensive, - # and we assume that Ubuntu is enough to cover the UNIX case. - os: [ubuntu-latest, windows-latest] - python: ['3.x'] - test-suite: [ts-unit, python-unit, venv, single-workspace, multi-workspace, debugger, functional] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: ${{ env.special-working-directory-relative }} - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Install Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - - name: Download get-pip.py - run: | - python -m pip install wheel - python -m pip install -r build/build-install-requirements.txt - python ./pythonFiles/download_get_pip.py - shell: bash - - - name: Install debugpy - run: | - # 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. - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - - - name: Install core Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/python" --no-cache-dir --implementation py' - if: startsWith(matrix.python, 3.) - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/pythonFiles/jedilsp_requirements/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/jedilsp" --no-cache-dir --implementation py' - if: startsWith(matrix.python, 3.) - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install debugpy wheels (Python ${{ matrix.python }}) - run: | - python -m pip install wheel - python -m pip install -r build/build-install-requirements.txt - python ./pythonFiles/install_debugpy.py - shell: bash - if: matrix.test-suite == 'debugger' - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - if: matrix.test-suite == 'functional' - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - # 1. For `terminalActivation.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION - run: | - echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV - echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV - shell: bash - if: matrix.test-suite != 'ts-unit' - - # Run TypeScript unit tests only for Python 3.X. - - name: Run TypeScript unit tests - run: npm run test:unittests - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, '3.') - - - name: Run Python unit tests - run: python pythonFiles/tests/run_all.py - if: matrix.test-suite == 'python-unit' - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'venv' && matrix.os == 'ubuntu-latest' - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'single-workspace' - - - name: Run multi-workspace tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testMultiWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'multi-workspace' - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testDebugger - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'debugger' - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - run: npm run test:functional - if: matrix.test-suite == 'functional' - - smoke-tests: - name: Smoke tests - if: github.repository == 'microsoft/vscode-python' - runs-on: ${{ matrix.os }} - needs: [setup, build-vsix] - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. - os: [ubuntu-latest, windows-latest] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Smoke tests - uses: ./.github/actions/smoke-tests - with: - node_version: ${{ env.NODE_VERSION }} - artifact_name: ${{ needs.setup.outputs.vsix_artifact_name }} diff --git a/src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts b/src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts index 7ed18c0e8b2a..9b30d0e510e7 100644 --- a/src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts +++ b/src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts @@ -32,6 +32,7 @@ export class VirtualEnvironmentPrompt implements IExtensionActivationService { ) {} public async activate(resource: Uri): Promise { + // Random const disposable = this.pyenvs.onDidCreate(resource, () => this.handleNewEnvironment(resource)); this.disposableRegistry.push(disposable); } From 7e729b483d3c411f1e8bdff0f05719554067e336 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 6 Sep 2023 13:31:36 -0700 Subject: [PATCH 3/3] Dfdfsd (#42) * sdf * sdf * dfgd * d * dfdf --- .github/actions/build-vsix/action.yml | 92 ---- .github/actions/lint/action.yml | 56 -- .github/actions/smoke-tests/action.yml | 67 --- .github/workflows/build.yml | 43 -- .github/workflows/codeql-analysis.yml | 68 --- .../community-feedback-auto-comment.yml | 28 - .github/workflows/getLabels.js | 25 - .github/workflows/info-needed-closer.yml | 28 - .github/workflows/issue-labels.yml | 36 -- .github/workflows/lock-issues.yml | 24 - .github/workflows/pr-check.yml | 499 ------------------ .github/workflows/pr-file-check.yml | 44 -- .github/workflows/pr-labels.yml | 21 - .github/workflows/python27-issue-response.yml | 14 - .github/workflows/remove-needs-labels.yml | 18 - .../workflows/test-plan-item-validator.yml | 29 - .github/workflows/triage-info-needed.yml | 51 -- 17 files changed, 1143 deletions(-) delete mode 100644 .github/actions/build-vsix/action.yml delete mode 100644 .github/actions/lint/action.yml delete mode 100644 .github/actions/smoke-tests/action.yml delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/community-feedback-auto-comment.yml delete mode 100644 .github/workflows/getLabels.js delete mode 100644 .github/workflows/info-needed-closer.yml delete mode 100644 .github/workflows/issue-labels.yml delete mode 100644 .github/workflows/lock-issues.yml delete mode 100644 .github/workflows/pr-check.yml delete mode 100644 .github/workflows/pr-file-check.yml delete mode 100644 .github/workflows/pr-labels.yml delete mode 100644 .github/workflows/python27-issue-response.yml delete mode 100644 .github/workflows/remove-needs-labels.yml delete mode 100644 .github/workflows/test-plan-item-validator.yml delete mode 100644 .github/workflows/triage-info-needed.yml diff --git a/.github/actions/build-vsix/action.yml b/.github/actions/build-vsix/action.yml deleted file mode 100644 index 4c783fed1c42..000000000000 --- a/.github/actions/build-vsix/action.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: 'Build VSIX' -description: "Build the extension's VSIX" - -inputs: - node_version: - description: 'Version of Node to install' - required: true - vsix_name: - description: 'Name to give the final VSIX' - required: true - artifact_name: - description: 'Name to give the artifact containing the VSIX' - required: true - -runs: - using: 'composite' - steps: - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ inputs.node_version }} - cache: 'npm' - - # Jedi LS depends on dataclasses which is not in the stdlib in Python 3.7. - - name: Use Python 3.7 for JediLSP - uses: actions/setup-python@v4 - with: - python-version: 3.7 - cache: 'pip' - cache-dependency-path: | - requirements.txt - build/build-install-requirements.txt - pythonFiles/jedilsp_requirements/requirements.txt - - - name: Upgrade Pip - run: python -m pip install -U pip - shell: bash - - # For faster/better builds of sdists. - - name: Install build pre-requisite - run: python -m pip install wheel - shell: bash - - - name: Install Python dependencies - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./pythonFiles/lib/python --implementation py' - - - name: Install debugpy and get-pip - run: | - python -m pip --disable-pip-version-check install packaging - python ./pythonFiles/install_debugpy.py - python ./pythonFiles/download_get_pip.py - shell: bash - - - name: Install Jedi LSP - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt' - options: '-t ./pythonFiles/lib/jedilsp --implementation py --platform any --abi none' - - - name: Run npm ci - run: npm ci --prefer-offline - shell: bash - - # Use the GITHUB_RUN_ID environment variable to update the build number. - # GITHUB_RUN_ID is a unique number for each run within a repository. - # This number does not change if you re-run the workflow run. - - name: Update extension build number - run: npm run updateBuildNumber -- --buildNumber $GITHUB_RUN_ID - shell: bash - - - name: Update optional extension dependencies - run: npm run addExtensionPackDependencies - shell: bash - - - name: Build VSIX - run: npm run package - shell: bash - - - name: Rename VSIX - # Move to a temp name in case the specified name happens to match the default name. - run: mv ms-python-insiders.vsix ms-python-temp.vsix && mv ms-python-temp.vsix ${{ inputs.vsix_name }} - shell: bash - - - name: Upload VSIX - uses: actions/upload-artifact@v3 - with: - name: ${{ inputs.artifact_name }} - path: ${{ inputs.vsix_name }} - if-no-files-found: error - retention-days: 7 diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml deleted file mode 100644 index 1d302b055bee..000000000000 --- a/.github/actions/lint/action.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: 'Lint' -description: 'Lint TypeScript and Python code' - -inputs: - node_version: - description: 'Version of Node to install' - required: true - -runs: - using: 'composite' - steps: - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ inputs.node_version }} - cache: 'npm' - - - name: Install Node dependencies - run: npm ci --prefer-offline - shell: bash - - - name: Run `gulp prePublishNonBundle` - run: npx gulp prePublishNonBundle - shell: bash - - - name: Check dependencies - run: npm run checkDependencies - shell: bash - - - name: Lint TypeScript code - run: npm run lint - shell: bash - - - name: Check TypeScript format - run: npm run format-check - shell: bash - - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - cache: 'pip' - - - name: Check Python format - run: | - python -m pip install -U black - python -m black . --check - working-directory: pythonFiles - shell: bash - - - name: Run Ruff - run: | - python -m pip install -U ruff - python -m ruff check . - working-directory: pythonFiles - shell: bash diff --git a/.github/actions/smoke-tests/action.yml b/.github/actions/smoke-tests/action.yml deleted file mode 100644 index b2d002050433..000000000000 --- a/.github/actions/smoke-tests/action.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: 'Smoke tests' -description: 'Run smoke tests' - -inputs: - node_version: - description: 'Version of Node to install' - required: true - artifact_name: - description: 'Name of the artifact containing the VSIX' - required: true - -runs: - using: 'composite' - steps: - - name: Install Node - uses: actions/setup-node@v2 - with: - node-version: ${{ inputs.node_version }} - cache: 'npm' - - - name: Install Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - cache: 'pip' - cache-dependency-path: | - build/test-requirements.txt - requirements.txt - - - name: Install dependencies (npm ci) - run: npm ci --prefer-offline - shell: bash - - - name: Install Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./pythonFiles/lib/python --implementation py' - - - name: pip install system test requirements - run: | - python -m pip install --upgrade -r build/test-requirements.txt - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy - shell: bash - - # Bits from the VSIX are reused by smokeTest.ts to speed things up. - - name: Download VSIX - uses: actions/download-artifact@v2 - with: - name: ${{ inputs.artifact_name }} - - - name: Prepare for smoke tests - run: npx tsc -p ./ - shell: bash - - - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION - run: | - echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV - echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV - shell: bash - - - name: Run smoke tests - env: - DISPLAY: 10 - INSTALL_JUPYTER_EXTENSION: true - uses: GabrielBB/xvfb-action@v1.5 - with: - run: node --no-force-async-hooks-checks ./out/test/smokeTest.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 03eb5435d82e..000000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build - -on: - push: - branches: - - 'main' - - 'release' - - 'release/*' - - 'release-*' - -env: - NODE_VERSION: 16.17.1 - PYTHON_VERSION: '3.10' # YML treats 3.10 the number as 3.1, so quotes around 3.10 - # Force a path with spaces and to test extension works in these scenarios - # Unicode characters are causing 2.7 failures so skip that for now. - special-working-directory: './path with spaces' - special-working-directory-relative: 'path with spaces' - # Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter). - # Also enables a reporter which exits the process running the tests if it haven't already. - MOCHA_REPORTER_JUNIT: true - -jobs: - setup: - name: Set up - if: github.repository == 'microsoft/vscode-python' - runs-on: ubuntu-latest - defaults: - run: - shell: python - outputs: - vsix_name: ${{ steps.vsix_names.outputs.vsix_name }} - vsix_artifact_name: ${{ steps.vsix_names.outputs.vsix_artifact_name }} - steps: - - name: VSIX names - id: vsix_names - run: | - import os - if os.environ["GITHUB_REF"].endswith("/main"): - vsix_type = "insiders" - else: - vsix_type = "release" - print(f"::set-output name=vsix_name::ms-python-{vsix_type}.vsix") - print(f"::set-output name=vsix_artifact_name::ms-python-{vsix_type}-vsix") diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 5b037d5a1d0b..000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,68 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: 'CodeQL' - -on: - push: - branches: - - main - - release-* - - release/* - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: '0 3 * * 0' - -permissions: - security-events: write - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['javascript', 'python'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - #- name: Autobuild - # uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/community-feedback-auto-comment.yml b/.github/workflows/community-feedback-auto-comment.yml deleted file mode 100644 index 1bb8ca9b10da..000000000000 --- a/.github/workflows/community-feedback-auto-comment.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Community Feedback Auto Comment - -on: - issues: - types: - - labeled -jobs: - add-comment: - if: github.event.label.name == 'needs community feedback' - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Check For Existing Comment - uses: peter-evans/find-comment@v2 - id: finder - with: - issue-number: ${{ github.event.issue.number }} - comment-author: 'github-actions[bot]' - body-includes: 'Thanks for the feature request! We are going to give the community' - - - name: Add Community Feedback Comment - if: steps.finder.outputs.comment-id == '' - uses: peter-evans/create-or-update-comment@v3 - with: - issue-number: ${{ github.event.issue.number }} - body: | - Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. diff --git a/.github/workflows/getLabels.js b/.github/workflows/getLabels.js deleted file mode 100644 index 99060e7205eb..000000000000 --- a/.github/workflows/getLabels.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * To run this file: - * * npm install @octokit/rest - * * node .github/workflows/getLabels.js - * - * This script assumes the maximum number of labels to be 100. - */ - -const { Octokit } = require('@octokit/rest'); -const github = new Octokit(); -github.rest.issues - .listLabelsForRepo({ - owner: 'microsoft', - repo: 'vscode-python', - per_page: 100, - }) - .then((result) => { - const labels = result.data.map((label) => label.name); - console.log( - '\nNumber of labels found:', - labels.length, - ", verify that it's the same as number of labels listed in https://github.com/microsoft/vscode-python/labels\n", - ); - console.log(JSON.stringify(labels), '\n'); - }); diff --git a/.github/workflows/info-needed-closer.yml b/.github/workflows/info-needed-closer.yml deleted file mode 100644 index 442799cd7a16..000000000000 --- a/.github/workflows/info-needed-closer.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Info-Needed Closer -on: - schedule: - - cron: 20 12 * * * # 5:20am Redmond - repository_dispatch: - types: [trigger-needs-more-info] - workflow_dispatch: - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: 'microsoft/vscode-github-triage-actions' - path: ./actions - ref: stable - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run info-needed Closer - uses: ./actions/needs-more-info-closer - with: - label: info-needed - closeDays: 30 - closeComment: "Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. \n\nHappy Coding!" - pingDays: 30 - pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information." diff --git a/.github/workflows/issue-labels.yml b/.github/workflows/issue-labels.yml deleted file mode 100644 index 7817ed62bd9b..000000000000 --- a/.github/workflows/issue-labels.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Issue labels - -on: - issues: - types: [opened, reopened] - -env: - # To update the list of labels, see `getLabels.js`. - REPO_LABELS: '["area-api","area-data science","area-debugging","area-diagnostics","area-editor-*","area-environments","area-formatting","area-intellisense","area-internal","area-linting","area-repl","area-terminal","area-testing","author-verification-requested","bug","community ask","debt","dependencies","documentation","experimenting","feature-request","good first issue","help wanted","important","info-needed","invalid-testplan-item","investigating","iteration-candidate","iteration-plan","iteration-plan-draft","javascript","linux","macos","meta","needs community feedback","needs PR","needs proposal","needs spike","no-changelog","on-testplan","partner ask","regression","release-plan","reports-wanted","skip package*.json","skip tests","tensorboard","testplan-item","triage-needed","verification-found","verification-needed","verification-steps-needed","verified","windows"]' - TRIAGERS: '["karrtikr","karthiknadig","paulacamargo25","eleanorjboyd","anthonykim1"]' - -permissions: - issues: write - -jobs: - # From https://github.com/marketplace/actions/github-script#apply-a-label-to-an-issue. - add-classify-label: - name: "Add 'triage-needed' and remove unrecognizable labels & assignees" - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: 'microsoft/vscode-github-triage-actions' - ref: stable - path: ./actions - - - name: Install Actions - run: npm install --production --prefix ./actions - - - name: "Add 'triage-needed' and remove unrecognizable labels & assignees" - uses: ./actions/python-issue-labels - with: - triagers: ${{ env.TRIAGERS }} - token: ${{secrets.GITHUB_TOKEN}} - repo_labels: ${{ env.REPO_LABELS }} diff --git a/.github/workflows/lock-issues.yml b/.github/workflows/lock-issues.yml deleted file mode 100644 index bcd9ea267f9f..000000000000 --- a/.github/workflows/lock-issues.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: 'Lock Issues' - -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: - -permissions: - issues: write - -concurrency: - group: lock - -jobs: - lock-issues: - runs-on: ubuntu-latest - steps: - - name: 'Lock Issues' - uses: dessant/lock-threads@v4 - with: - github-token: ${{ github.token }} - issue-inactive-days: '30' - process-only: 'issues' - log-output: true diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index c7335702e991..000000000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,499 +0,0 @@ -name: PR/CI Check - -on: - pull_request: - push: - branches-ignore: - - main - - release* - -env: - NODE_VERSION: 16.17.1 - PYTHON_VERSION: '3.10' # YML treats 3.10 the number as 3.1, so quotes around 3.10 - MOCHA_REPORTER_JUNIT: true # Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter). Also enables a reporter which exits the process running the tests if it haven't already. - ARTIFACT_NAME_VSIX: ms-python-insiders-vsix - VSIX_NAME: ms-python-insiders.vsix - TEST_RESULTS_DIRECTORY: . - # Force a path with spaces and to test extension works in these scenarios - # Unicode characters are causing 2.7 failures so skip that for now. - special-working-directory: './path with spaces' - special-working-directory-relative: 'path with spaces' - -jobs: - build-vsix: - name: Create VSIX - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Build VSIX - uses: ./.github/actions/build-vsix - with: - node_version: ${{ env.NODE_VERSION}} - vsix_name: ${{ env.VSIX_NAME }} - artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Lint - uses: ./.github/actions/lint - with: - node_version: ${{ env.NODE_VERSION }} - - check-types: - name: Check Python types - runs-on: ubuntu-latest - steps: - - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./pythonFiles/lib/python --no-cache-dir --implementation py' - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt' - options: '-t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py' - - - name: Install other Python requirements - run: | - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - python -m pip install --upgrade -r build/test-requirements.txt - - - name: Run Pyright - uses: jakebailey/pyright-action@v1 - with: - version: 1.1.308 - working-directory: 'pythonFiles' - - ### Non-smoke tests - tests: - name: Tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: ${{ env.special-working-directory }} - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. - os: [ubuntu-latest, windows-latest] - # Run the tests on the oldest and most recent versions of Python. - python: ['3.x'] - test-suite: [ts-unit, python-unit, venv, single-workspace, debugger, functional] - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: ${{ env.special-working-directory-relative }} - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - - name: Install debugpy - run: | - # 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. - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - - - name: Download get-pip.py - run: | - python -m pip install wheel - python -m pip install -r build/build-install-requirements.txt - python ./pythonFiles/download_get_pip.py - shell: bash - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/python" --no-cache-dir --implementation py' - if: startsWith(matrix.python, 3.) - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/pythonFiles/jedilsp_requirements/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/jedilsp" --no-cache-dir --implementation py' - if: startsWith(matrix.python, 3.) - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install debugpy wheels (Python ${{ matrix.python }}) - run: | - python -m pip install wheel - python -m pip --disable-pip-version-check install -r build/build-install-requirements.txt - python ./pythonFiles/install_debugpy.py - shell: bash - if: matrix.test-suite == 'debugger' - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - if: matrix.test-suite == 'functional' - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - # 1. For `terminalActivation.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION - run: | - echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV - echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV - shell: bash - if: matrix.test-suite != 'ts-unit' - - # Run TypeScript unit tests only for Python 3.X. - - name: Run TypeScript unit tests - run: npm run test:unittests - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) - - # Run the Python tests in our codebase. - - name: Run Python unit tests - run: | - python pythonFiles/tests/run_all.py - if: matrix.test-suite == 'python-unit' - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'venv' && matrix.os == 'ubuntu-latest' - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'single-workspace' - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testDebugger - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'debugger' - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - run: npm run test:functional - if: matrix.test-suite == 'functional' - - smoke-tests: - name: Smoke tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - needs: [build-vsix] - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. - os: [ubuntu-latest, windows-latest] - steps: - # Need the source to have the tests available. - - name: Checkout - uses: actions/checkout@v4 - - - name: Smoke tests - uses: ./.github/actions/smoke-tests - with: - node_version: ${{ env.NODE_VERSION }} - artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - - ### Coverage run - coverage: - name: Coverage - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Only run coverage on linux for PRs - os: [ubuntu-latest] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' - cache-dependency-path: | - requirements.txt - pythonFiles/jedilsp_requirements/requirements.txt - build/test-requirements.txt - build/functional-test-requirements.txt - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./pythonFiles/lib/python --implementation py' - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt' - options: '-t ./pythonFiles/lib/jedilsp --implementation py' - - - name: Install debugpy - run: | - # 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. - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - # 1. For `terminalActivation.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Run TypeScript unit tests - run: npm run test:unittests:cover - - - name: Run Python unit tests - run: | - python pythonFiles/tests/run_all.py - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace:cover - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace:cover - - # Enable these tests when coverage is setup for multiroot workspace tests - # - name: Run multi-workspace tests - # env: - # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - # CI_DISABLE_AUTO_SELECTION: 1 - # uses: GabrielBB/xvfb-action@v1.6 - # with: - # run: npm run testMultiWorkspace:cover - - # Enable these tests when coverage is setup for debugger tests - # - name: Run debugger tests - # env: - # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - # CI_DISABLE_AUTO_SELECTION: 1 - # uses: GabrielBB/xvfb-action@v1.6 - # with: - # run: npm run testDebugger:cover - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - env: - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - run: npm run test:functional:cover - - - name: Generate coverage reports - run: npm run test:cover:report - - - name: Upload HTML report - uses: actions/upload-artifact@v3 - with: - name: ${{ runner.os }}-coverage-report-html - path: ./coverage - retention-days: 1 diff --git a/.github/workflows/pr-file-check.yml b/.github/workflows/pr-file-check.yml deleted file mode 100644 index ba019c790e99..000000000000 --- a/.github/workflows/pr-file-check.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: PR files - -on: - pull_request: - types: - # On by default if you specify no types. - - 'opened' - - 'reopened' - - 'synchronize' - # For `skip-label` only. - - 'labeled' - - 'unlabeled' - -jobs: - changed-files-in-pr: - name: 'Check for changed files' - runs-on: ubuntu-latest - steps: - - name: 'package-lock.json matches package.json' - uses: brettcannon/check-for-changed-files@v1.2.0 - with: - prereq-pattern: 'package.json' - file-pattern: 'package-lock.json' - skip-label: 'skip package*.json' - failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)' - - - name: 'package.json matches package-lock.json' - uses: brettcannon/check-for-changed-files@v1.2.0 - with: - prereq-pattern: 'package-lock.json' - file-pattern: 'package.json' - skip-label: 'skip package*.json' - failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)' - - - name: 'Tests' - uses: brettcannon/check-for-changed-files@v1.2.0 - with: - prereq-pattern: src/**/*.ts - file-pattern: | - src/**/*.test.ts - src/**/*.testvirtualenvs.ts - .github/test_plan.md - skip-label: 'skip tests' - failure-message: 'TypeScript code was edited without also editing a ${file-pattern} file; see the Testing page in our wiki on testing guidelines (the ${skip-label} label can be used to pass this check)' diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml deleted file mode 100644 index 730b8e5c5832..000000000000 --- a/.github/workflows/pr-labels.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'PR labels' -on: - pull_request: - types: - - 'opened' - - 'reopened' - - 'labeled' - - 'unlabeled' - - 'synchronize' - -jobs: - classify: - name: 'Classify PR' - runs-on: ubuntu-latest - steps: - - name: 'PR impact specified' - uses: mheap/github-action-required-labels@v5 - with: - mode: exactly - count: 1 - labels: 'bug, debt, feature-request, no-changelog' diff --git a/.github/workflows/python27-issue-response.yml b/.github/workflows/python27-issue-response.yml deleted file mode 100644 index 4d51e9921ab4..000000000000 --- a/.github/workflows/python27-issue-response.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: - issues: - types: [opened] - -jobs: - python27-issue-response: - runs-on: ubuntu-latest - if: "contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7')" - steps: - - name: Check for Python 2.7 string - run: | - response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif](https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif)" - gh issue comment ${{ github.event.issue.number }} --body "$response" - gh issue close ${{ github.event.issue.number }} diff --git a/.github/workflows/remove-needs-labels.yml b/.github/workflows/remove-needs-labels.yml deleted file mode 100644 index 3d218e297a11..000000000000 --- a/.github/workflows/remove-needs-labels.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: 'Remove Needs Label' -on: - issues: - types: [closed] - -jobs: - classify: - name: 'Remove needs labels on issue closing' - runs-on: ubuntu-latest - steps: - - name: 'Removes needs labels on issue close' - uses: actions-ecosystem/action-remove-labels@v1 - with: - labels: | - needs PR - needs spike - needs community feedback - needs proposal diff --git a/.github/workflows/test-plan-item-validator.yml b/.github/workflows/test-plan-item-validator.yml deleted file mode 100644 index 17f1740345f2..000000000000 --- a/.github/workflows/test-plan-item-validator.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Test Plan Item Validator -on: - issues: - types: [edited, labeled] - -permissions: - issues: write - -jobs: - main: - runs-on: ubuntu-latest - if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item') - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: 'microsoft/vscode-github-triage-actions' - path: ./actions - ref: stable - - - name: Install Actions - run: npm install --production --prefix ./actions - - - name: Run Test Plan Item Validator - uses: ./actions/test-plan-item-validator - with: - label: testplan-item - invalidLabel: invalid-testplan-item - comment: Invalid test plan item. See errors below and the [test plan item spec](https://github.com/microsoft/vscode/wiki/Writing-Test-Plan-Items) for more information. This comment will go away when the issues are resolved. diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml deleted file mode 100644 index 24ad2ed2c480..000000000000 --- a/.github/workflows/triage-info-needed.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Triage "info-needed" label - -on: - issue_comment: - types: [created] - -env: - TRIAGERS: '["karrtikr","karthiknadig","paulacamargo25","eleanorjboyd", "brettcannon","anthonykim1"]' - -jobs: - add_label: - runs-on: ubuntu-latest - if: contains(github.event.issue.labels.*.name, 'triage-needed') && !contains(github.event.issue.labels.*.name, 'info-needed') - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: 'microsoft/vscode-github-triage-actions' - ref: stable - path: ./actions - - - name: Install Actions - run: npm install --production --prefix ./actions - - - name: Add "info-needed" label - uses: ./actions/python-triage-info-needed - with: - triagers: ${{ env.TRIAGERS }} - action: 'add' - token: ${{secrets.GITHUB_TOKEN}} - - remove_label: - if: contains(github.event.issue.labels.*.name, 'info-needed') && contains(github.event.issue.labels.*.name, 'triage-needed') - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: 'microsoft/vscode-github-triage-actions' - ref: stable - path: ./actions - - - name: Install Actions - run: npm install --production --prefix ./actions - - - name: Remove "info-needed" label - uses: ./actions/python-triage-info-needed - with: - triagers: ${{ env.TRIAGERS }} - action: 'remove' - token: ${{secrets.GITHUB_TOKEN}}