diff --git a/.github/workflows/insiders.yml b/.github/workflows/build.yml similarity index 84% rename from .github/workflows/insiders.yml rename to .github/workflows/build.yml index b147600b1917..d7f03dad3317 100644 --- a/.github/workflows/insiders.yml +++ b/.github/workflows/build.yml @@ -1,27 +1,49 @@ -name: Insiders Build +name: Build on: push: branches: - - main + - 'main' + - 'release' + - 'release/*' + - 'release-*' env: + PYTHON_DEBUGPY_WHEEL_VERSION: 3.8 NODE_VERSION: 12.15.0 - PYTHON_VERSION: 3.9 - 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: + 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") + build-vsix: name: Build VSIX - runs-on: ubuntu-latest if: github.repository == 'microsoft/vscode-python' + needs: setup + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 @@ -31,10 +53,10 @@ jobs: with: node-version: ${{env.NODE_VERSION}} - - name: Use Python ${{env.PYTHON_VERSION}} + - name: Use Python 3.x uses: actions/setup-python@v2 with: - python-version: ${{env.PYTHON_VERSION}} + python-version: 3.x - name: Upgrade pip run: python -m pip install -U pip @@ -44,19 +66,19 @@ jobs: id: build-vsix - name: Rename VSIX - if: steps.build-vsix.outputs.path != env.VSIX_NAME - run: mv ${{ steps.build-vsix.outputs.path }} ${{ env.VSIX_NAME }} + if: steps.build-vsix.outputs.path != needs.setup.outputs.vsix_name + run: mv ${{ steps.build-vsix.outputs.path }} ${{ needs.setup.outputs.vsix_name }} - uses: actions/upload-artifact@v2 with: - name: ${{env.ARTIFACT_NAME_VSIX}} - path: ${{env.VSIX_NAME}} - retention-days: 7 + name: ${{ needs.setup.outputs.vsix_artifact_name }} + path: ${{ needs.setup.outputs.vsix_name }} + retention-days: 14 lint: name: Lint - runs-on: ubuntu-latest if: github.repository == 'microsoft/vscode-python' + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 @@ -81,10 +103,10 @@ jobs: - name: Run formatting on TypeScript code run: npm run format-check - - name: Use Python ${{env.PYTHON_VERSION}} + - name: Use Python 3.x uses: actions/setup-python@v2 with: - python-version: ${{env.PYTHON_VERSION}} + python-version: 3.x - name: Run Black on Python code run: | @@ -95,20 +117,19 @@ jobs: ### 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. + if: github.repository == 'microsoft/vscode-python' runs-on: ${{ matrix.os }} defaults: run: working-directory: ${{env.special-working-directory}} - if: github.repository == 'microsoft/vscode-python' 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. + # 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: [2.7, 3.9] + python: ['2.7', '3.x'] test-suite: [ts-unit, python-unit, venv, single-workspace, multi-workspace, debugger, functional] steps: - name: Checkout @@ -127,7 +148,13 @@ jobs: - name: Compile run: npx gulp prePublishNonBundle - - name: Use Python ${{matrix.python}} + - name: Install Python ${{ env.PYTHON_DEBUGPY_WHEEL_VERSION }} for debugpy wheels + if: matrix.test_suite == 'debugger' + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_DEBUGPY_WHEEL_VERSION }} + + - name: Install Python ${{matrix.python}} uses: actions/setup-python@v2 with: python-version: ${{matrix.python}} @@ -139,7 +166,7 @@ jobs: - name: Install Python requirements run: | - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user + python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt # 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 @@ -148,11 +175,11 @@ jobs: - name: Install debugpy wheels (python 3.8) run: | - python -m pip install wheel - python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt - python ./pythonFiles/install_debugpy.py + python${{ env.PYTHON_DEBUGPY_WHEEL_VERSION }} -m pip install wheel + python${{ env.PYTHON_DEBUGPY_WHEEL_VERSION }} -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt + python${{ env.PYTHON_DEBUGPY_WHEEL_VERSION }} ./pythonFiles/install_debugpy.py shell: bash - if: matrix.test-suite == 'debugger' && matrix.python == 3.8 + if: matrix.test-suite == 'debugger' - name: Install debugpy (python 2.7) run: | @@ -247,12 +274,10 @@ jobs: # 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.) + 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 + run: python pythonFiles/tests/run_all.py if: matrix.test-suite == 'python-unit' # The virtual environment based tests use the `testSingleWorkspace` set of tests @@ -305,20 +330,17 @@ jobs: 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 }} if: github.repository == 'microsoft/vscode-python' - needs: [build-vsix] + 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] - # 3.8 is still required here so that jupyter can install. - python: [3.8] + python: ['3.x'] steps: - # Need the source to have the tests available. - name: Checkout uses: actions/checkout@v2 @@ -351,9 +373,8 @@ jobs: - name: Download VSIX uses: actions/download-artifact@v2 with: - name: ${{env.ARTIFACT_NAME_VSIX}} + name: ${{ needs.setup.outputs.vsix_artifactname }} - # Compile the test files. - name: Prepare for smoke tests run: npx tsc -p ./ shell: bash @@ -374,18 +395,16 @@ jobs: insider-tests: name: Insider 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 }} if: github.repository == 'microsoft/vscode-python' + runs-on: ${{ matrix.os }} 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] - python: [3.8] + python: [3.8] # For Jupyter. steps: - # Need the source to have the tests available. - name: Checkout uses: actions/checkout@v2 @@ -439,9 +458,9 @@ jobs: upload: name: Upload VSIX to Azure Blob Storage - if: github.repository == 'microsoft/vscode-python' + if: github.repository == 'microsoft/vscode-python' && github.ref == 'refs/heads/main' + needs: [setup, tests, smoke-tests, build-vsix] runs-on: ubuntu-latest - needs: [tests, smoke-tests, build-vsix] env: BLOB_CONTAINER_NAME: extension-builds BLOB_NAME: ms-python-insiders.vsix @@ -449,12 +468,12 @@ jobs: - name: Download VSIX uses: actions/download-artifact@v2 with: - name: ${{ env.ARTIFACT_NAME_VSIX }} + name: ${{ needs.setup.outputs.vsix_artifact_name }} - name: Azure Login uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - name: Upload to Blob Storage - run: az storage blob upload --file ${{ env.VSIX_NAME }} --account-name pvsc --container-name ${{ env.BLOB_CONTAINER_NAME }} --name ${{ env.BLOB_NAME }} --auth-mode login + run: az storage blob upload --file ${{ needs.setup.outputs.vsix_name }} --account-name pvsc --container-name ${{ env.BLOB_CONTAINER_NAME }} --name ${{ env.BLOB_NAME }} --auth-mode login - name: Get URL to uploaded VSIX run: az storage blob url --account-name pvsc --container-name ${{ env.BLOB_CONTAINER_NAME }} --name ${{ env.BLOB_NAME }} --auth-mode login diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 17799ff234b2..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,433 +0,0 @@ -name: Release Build - -on: - push: - branches: - - 'release' - - 'release/*' - - 'release-*' - -env: - PYTHON_VERSION: 3.8 - NODE_VERSION: 12.15.0 - MOCHA_REPORTER_JUNIT: false # 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 hasn't already. - # Key for the cache created at the end of the the 'Cache ./pythonFiles/lib/python' step. - CACHE_PYTHONFILES: cache-pvsc-pythonFiles - ARTIFACT_NAME_VSIX: ms-python-release-vsix - VSIX_NAME: ms-python-release.vsix - TEST_RESULTS_DIRECTORY: . - -jobs: - build-vsix: - name: Build VSIX - runs-on: ubuntu-latest - if: github.repository == 'microsoft/vscode-python' - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Node - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Python ${{env.PYTHON_VERSION}} - uses: actions/setup-python@v2 - with: - python-version: ${{env.PYTHON_VERSION}} - - - name: Upgrade pip - run: python -m pip install -U pip - - - name: Build VSIX - uses: ./.github/actions/build-vsix - id: build-vsix - - - name: Rename VSIX - if: steps.build-vsix.outputs.path != env.VSIX_NAME - run: mv ${{ steps.build-vsix.outputs.path }} ${{ env.VSIX_NAME }} - - - uses: actions/upload-artifact@v2 - with: - name: ${{ env.ARTIFACT_NAME_VSIX }} - path: ${{ env.VSIX_NAME }} - retention-days: 14 - - lint: - # Unlike for the insiders build, we skip linting file formatting as that - # will be caught when we merge back into 'main'. - name: Lint - runs-on: ubuntu-latest - if: github.repository == 'microsoft/vscode-python' - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Node - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Install dependencies (npm ci) - run: npm ci --prefer-offline - - - name: Run gulp prePublishNonBundle - run: npx gulp prePublishNonBundle - - - name: Check dependencies - run: npm run checkDependencies - - - name: Run linting on TypeScript code - run: npm run lint - - - name: Run formatting on TypeScript code - run: npm run format-check - - ### 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 }} - env: - # 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' - defaults: - run: - working-directory: ${{env.special-working-directory}} - if: github.repository == 'microsoft/vscode-python' - 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: [2.7, 3.8] - test-suite: [ts-unit, python-unit, venv, single-workspace, multi-workspace, debugger, functional] - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - path: ${{env.special-working-directory-relative}} - - - name: Install Node - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Use Python ${{matrix.python}} - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.python}} - - - name: Install Node - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Install Python requirements - run: | - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt - # 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 test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install debugpy wheels (python 3.8) - run: | - python -m pip install wheel - python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt - python ./pythonFiles/install_debugpy.py - shell: bash - if: matrix.test-suite == 'debugger' && matrix.python == 3.8 - - - name: Install debugpy (python 2.7) - run: | - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - shell: bash - if: matrix.test-suite == 'debugger' && matrix.python == 2.7 - - - 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 - - # 2. For `interpreterLocatorService.testvirtualenvs.ts` - - & $condaExecPath create -n "test_env1" -y python - & $condaExecPath create -p "./test_env2" -y python - & $condaExecPath create -p "~/test_env3" -y python - - - 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.5 - with: - run: npm run testSingleWorkspace - working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'venv' - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{matrix.python}} - uses: GabrielBB/xvfb-action@v1.5 - 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.5 - 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.5 - 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 }} - if: github.repository == 'microsoft/vscode-python' - 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] - python: [3.8] - steps: - # Need the source to have the tests available. - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Node - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Python ${{matrix.python}} - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.python}} - - - name: Install dependencies (npm ci) - run: npm ci --prefer-offline - - - 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 --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - shell: bash - - - name: pip install smoke test requirements - run: | - python -m pip install --upgrade -r build/smoke-test-requirements.txt - shell: bash - - # Save time by reusing bits from the VSIX. - - name: Download VSIX - uses: actions/download-artifact@v2 - with: - name: ${{env.ARTIFACT_NAME_VSIX}} - - # Compile the test files. - - 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 - - insider-tests: - name: Insider 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 }} - if: github.repository == 'microsoft/vscode-python' - 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] - python: [3.8] - steps: - # Need the source to have the tests available. - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Node - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Python ${{matrix.python}} - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.python}} - - - name: Install dependencies (npm ci) - run: npm ci --prefer-offline - - - 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 --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - shell: bash - - - name: pip install smoke test requirements - run: | - python -m pip install --upgrade -r build/smoke-test-requirements.txt - shell: bash - - # Compile the test files. - - name: Prepare for insiders tests - run: npm run prePublish - 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 insider tests - env: - DISPLAY: 10 - INSTALL_JUPYTER_EXTENSION: true - INSTALL_PYLANCE_EXTENSION: true - VSC_PYTHON_CI_TEST_VSC_CHANNEL: insiders - TEST_FILES_SUFFIX: insiders.test - CODE_TESTS_WORKSPACE: ./src/testMultiRootWkspc/smokeTests - uses: GabrielBB/xvfb-action@v1.5 - with: - run: node --no-force-async-hooks-checks ./out/test/standardTest.js