From 722d9f3df8fc6361e2ef3b13cb3637be1da20e7b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 19:28:54 -0700 Subject: [PATCH 01/13] Enable coverage for venv and single workspace tests --- .github/codecov.yml | 34 -------------- .github/workflows/pr-check.yml | 81 +++++++++++++++++++++++++--------- package.json | 2 + 3 files changed, 62 insertions(+), 55 deletions(-) delete mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml deleted file mode 100644 index 9e7bc6e3d208..000000000000 --- a/.github/codecov.yml +++ /dev/null @@ -1,34 +0,0 @@ -codecov: - strict_yaml_branch: 'main' - notify: - require_ci_to_pass: yes - -coverage: - precision: 0 - round: down - range: '70...100' - - status: - project: - default: - informational: true - only_pulls: true - patch: yes - changes: no - -parsers: - gcov: - branch_detection: - conditional: yes - loop: yes - method: no - macro: no - -comment: - branches: ['main'] - layout: 'diff, files' - behavior: default - require_changes: no - -fixes: - - 'path with spaces/::' diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 80be9ab71961..5c4bed4af3bf 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -282,7 +282,26 @@ jobs: with: run: npm run testSingleWorkspace working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'venv' + if: matrix.test-suite == 'venv' && startsWith(matrix.python, 2.) + + - name: Run venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + CI_PYTHON_VERSION: ${{matrix.python}} + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testSingleWorkspace:cover + working-directory: ${{env.special-working-directory}} + if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) + + # Upload venv tests coverage reports for later use in the "reports" job. + - name: Upload venv tests coverage reports + uses: actions/upload-artifact@v2 + with: + name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} + path: ${{ env.special-working-directory }}/.nyc_output + retention-days: 1 + if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) - name: Run single-workspace tests env: @@ -309,7 +328,25 @@ jobs: with: run: npm run testDebugger working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'debugger' + if: matrix.test-suite == 'debugger' && startsWith(matrix.python, 2.) + + - name: Run debugger tests + env: + CI_PYTHON_VERSION: ${{matrix.python}} + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testDebugger:cover + working-directory: ${{env.special-working-directory}} + if: matrix.test-suite == 'debugger' && startsWith(matrix.python, 3.) + + # Upload debugger tests coverage reports for later use in the "reports" job. + - name: Upload debugger tests coverage reports + uses: actions/upload-artifact@v2 + with: + name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} + path: ${{ env.special-working-directory }}/.nyc_output + retention-days: 1 + if: matrix.test-suite == 'debugger' && startsWith(matrix.python, 3.) # Run TypeScript functional tests - name: Run TypeScript functional tests @@ -459,11 +496,19 @@ jobs: coverage: name: Coverage reports upload - runs-on: ubuntu-latest + # 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: [tests, smoke-tests] 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] + steps: # Checkout the repo in the same way as how the tests are run, # or nyc won't know how to reconcile the reports generated by the tests. @@ -483,32 +528,26 @@ jobs: # It isn't possible to specify a regex for artifact names, so we have to download each artifact manually. # The name pattern is ${{runner.os}}-${{env.COVERAGE_REPORTS}}, and possible values for runner.os are `Linux`, `Windows`, or `macOS`. # See https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#runner-context - - name: Download Ubuntu test coverage artifacts + - name: Download test coverage artifacts uses: actions/download-artifact@v2 with: - name: Linux-${{ env.COVERAGE_REPORTS }} - path: ${{env.special-working-directory}}/Linux-${{ env.COVERAGE_REPORTS }} + name: ${{ matrix.os }}-${{ env.COVERAGE_REPORTS }} + path: ${{env.special-working-directory}}/${{ matrix.os }}-${{ env.COVERAGE_REPORTS }} - - name: Extract Ubuntu coverage artifacts to ./nyc_output + - name: Extract coverage artifacts to ./nyc_output run: | mkdir .nyc_output - mv Linux-${{ env.COVERAGE_REPORTS }}/* .nyc_output - rm -r Linux-${{ env.COVERAGE_REPORTS }} + mv ${{ matrix.os }}-${{ env.COVERAGE_REPORTS }}/* .nyc_output + rm -r ${{ matrix.os }}-${{ env.COVERAGE_REPORTS }} + shell: bash - name: Generate coverage reports run: npm run test:cover:report continue-on-error: true - # The only location supported by the codecov action is the workspace root. - # See https://github.com/codecov/codecov-action#arguments - - name: Move codecov.yml to root - run: | - mkdir $GITHUB_WORKSPACE/.github - mv .github/codecov.yml $GITHUB_WORKSPACE - - - name: Upload coverage to codecov - uses: codecov/codecov-action@v1 + - name: Upload html test coverage reports + uses: actions/upload-artifact@v2 with: - # Can't use the token to disambiguate since secrets aren't available from PR-triggered runs. - #token: ${{ secrets.CODECOV_TOKEN }} - file: ${{env.special-working-directory}}/coverage/cobertura-coverage.xml + name: ${{ matrix.os }}-coverage-report-html + path: ${{ env.special-working-directory }}/coverage + retention-days: 1 diff --git a/package.json b/package.json index b3cc146a2f3d..06424a01c715 100644 --- a/package.json +++ b/package.json @@ -1976,7 +1976,9 @@ "test:functional:cover": "nyc --no-clean --nycrc-path ./build/.nycrc mocha --require source-map-support/register --config ./build/.mocha.functional.json", "test:cover:report": "nyc --nycrc-path ./build/.nycrc report --reporter=text --reporter=html --reporter=text-summary --reporter=cobertura", "testDebugger": "node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", + "testDebugger:cover": "nyc --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", "testSingleWorkspace": "node ./out/test/testBootstrap.js ./out/test/standardTest.js", + "testSingleWorkspace:cover": "nyc --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/standardTest.js", "preTestJediLSP": "node ./out/test/languageServers/jedi/lspSetup.js", "testJediLSP": "node ./out/test/languageServers/jedi/lspSetup.js && cross-env CODE_TESTS_WORKSPACE=src/test VSC_PYTHON_CI_TEST_GREP='Language Server:' node ./out/test/testBootstrap.js ./out/test/standardTest.js && node ./out/test/languageServers/jedi/lspTeardown.js", "testMultiWorkspace": "node ./out/test/testBootstrap.js ./out/test/multiRootTest.js", From 439a45876e9af4a42ed50f12f77728ec3c9a8130 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 19:45:41 -0700 Subject: [PATCH 02/13] Upload coverage for single workspace --- .github/workflows/pr-check.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 5c4bed4af3bf..2a8adb300710 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -308,10 +308,19 @@ jobs: CI_PYTHON_VERSION: ${{matrix.python}} uses: GabrielBB/xvfb-action@v1.4 with: - run: npm run testSingleWorkspace + run: npm run testSingleWorkspace:cover working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'single-workspace' + # Upload single workspace tests coverage reports for later use in the "reports" job. + - name: Upload single workspace tests coverage reports + uses: actions/upload-artifact@v2 + with: + name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} + path: ${{ env.special-working-directory }}/.nyc_output + retention-days: 1 + if: matrix.test-suite == 'single-workspace' + - name: Run multi-workspace tests env: CI_PYTHON_VERSION: ${{matrix.python}} From 5acd3fd91c7d56290cc1e33ac350e354379ab226 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 20:05:39 -0700 Subject: [PATCH 03/13] Try with spawn wrap --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 06424a01c715..c70dbab5200e 100644 --- a/package.json +++ b/package.json @@ -1976,9 +1976,9 @@ "test:functional:cover": "nyc --no-clean --nycrc-path ./build/.nycrc mocha --require source-map-support/register --config ./build/.mocha.functional.json", "test:cover:report": "nyc --nycrc-path ./build/.nycrc report --reporter=text --reporter=html --reporter=text-summary --reporter=cobertura", "testDebugger": "node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", - "testDebugger:cover": "nyc --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", + "testDebugger:cover": "nyc --no-clean --use-spawn-wrap --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", "testSingleWorkspace": "node ./out/test/testBootstrap.js ./out/test/standardTest.js", - "testSingleWorkspace:cover": "nyc --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/standardTest.js", + "testSingleWorkspace:cover": "nyc --no-clean --use-spawn-wrap --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/standardTest.js", "preTestJediLSP": "node ./out/test/languageServers/jedi/lspSetup.js", "testJediLSP": "node ./out/test/languageServers/jedi/lspSetup.js && cross-env CODE_TESTS_WORKSPACE=src/test VSC_PYTHON_CI_TEST_GREP='Language Server:' node ./out/test/testBootstrap.js ./out/test/standardTest.js && node ./out/test/languageServers/jedi/lspTeardown.js", "testMultiWorkspace": "node ./out/test/testBootstrap.js ./out/test/multiRootTest.js", From 9431e4d269dbd079df2ebabdf536028d0488d41c Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 20:08:52 -0700 Subject: [PATCH 04/13] Fix coverage artifact upload --- .github/workflows/pr-check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2a8adb300710..2cc09213234b 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -540,14 +540,14 @@ jobs: - name: Download test coverage artifacts uses: actions/download-artifact@v2 with: - name: ${{ matrix.os }}-${{ env.COVERAGE_REPORTS }} - path: ${{env.special-working-directory}}/${{ matrix.os }}-${{ env.COVERAGE_REPORTS }} + name: ${{ runner.os }}-${{ env.COVERAGE_REPORTS }} + path: ${{env.special-working-directory}}/${{ runner.os }}-${{ env.COVERAGE_REPORTS }} - name: Extract coverage artifacts to ./nyc_output run: | mkdir .nyc_output - mv ${{ matrix.os }}-${{ env.COVERAGE_REPORTS }}/* .nyc_output - rm -r ${{ matrix.os }}-${{ env.COVERAGE_REPORTS }} + mv ${{ runner.os }}-${{ env.COVERAGE_REPORTS }}/* .nyc_output + rm -r ${{ runner.os }}-${{ env.COVERAGE_REPORTS }} shell: bash - name: Generate coverage reports @@ -557,6 +557,6 @@ jobs: - name: Upload html test coverage reports uses: actions/upload-artifact@v2 with: - name: ${{ matrix.os }}-coverage-report-html + name: ${{ runner.os }}-coverage-report-html path: ${{ env.special-working-directory }}/coverage retention-days: 1 From 782b84db863f55cfda35d9654f4339351c2dc5c4 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 20:17:50 -0700 Subject: [PATCH 05/13] Try running tests with coverage directly --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c70dbab5200e..6a56deed2e45 100644 --- a/package.json +++ b/package.json @@ -1976,9 +1976,9 @@ "test:functional:cover": "nyc --no-clean --nycrc-path ./build/.nycrc mocha --require source-map-support/register --config ./build/.mocha.functional.json", "test:cover:report": "nyc --nycrc-path ./build/.nycrc report --reporter=text --reporter=html --reporter=text-summary --reporter=cobertura", "testDebugger": "node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", - "testDebugger:cover": "nyc --no-clean --use-spawn-wrap --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/debuggerTest.js", + "testDebugger:cover": "nyc --no-clean --use-spawn-wrap --nycrc-path ./build/.nycrc --require source-map-support/register node ./out/test/debuggerTest.js", "testSingleWorkspace": "node ./out/test/testBootstrap.js ./out/test/standardTest.js", - "testSingleWorkspace:cover": "nyc --no-clean --use-spawn-wrap --nycrc-path ./build/.nycrc node ./out/test/testBootstrap.js ./out/test/standardTest.js", + "testSingleWorkspace:cover": "nyc --no-clean --use-spawn-wrap --nycrc-path ./build/.nycrc --require source-map-support/register node ./out/test/standardTest.js", "preTestJediLSP": "node ./out/test/languageServers/jedi/lspSetup.js", "testJediLSP": "node ./out/test/languageServers/jedi/lspSetup.js && cross-env CODE_TESTS_WORKSPACE=src/test VSC_PYTHON_CI_TEST_GREP='Language Server:' node ./out/test/testBootstrap.js ./out/test/standardTest.js && node ./out/test/languageServers/jedi/lspTeardown.js", "testMultiWorkspace": "node ./out/test/testBootstrap.js ./out/test/multiRootTest.js", From 663f0d29deeb2fee2355314758bab6953938720e Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 21:21:20 -0700 Subject: [PATCH 06/13] Run coverage separately --- .github/workflows/insiders.yml | 123 ++--------- .github/workflows/nightly-coverage.yml | 274 +++++++++++++++++++++++++ .github/workflows/pr-check.yml | 155 ++------------ .github/workflows/release.yml | 27 +-- 4 files changed, 303 insertions(+), 276 deletions(-) create mode 100644 .github/workflows/nightly-coverage.yml diff --git a/.github/workflows/insiders.yml b/.github/workflows/insiders.yml index 55e2bd9ad187..ee7716b57876 100644 --- a/.github/workflows/insiders.yml +++ b/.github/workflows/insiders.yml @@ -9,11 +9,8 @@ env: 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. - # 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-insiders-vsix VSIX_NAME: ms-python-insiders.vsix - COVERAGE_REPORTS: tests-coverage-reports 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. @@ -247,16 +244,7 @@ jobs: # Run TypeScript unit tests only for Python 3.X. - name: Run TypeScript unit tests - run: npm run test:unittests:cover - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) - - # Upload unit test coverage reports for later use in the "reports" job. - - name: Upload unit test coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 + run: npm run test:unittests if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) # Run the Python tests in our codebase. @@ -310,16 +298,7 @@ jobs: # Run TypeScript functional tests - name: Run TypeScript functional tests - run: npm run test:functional:cover - if: matrix.test-suite == 'functional' - - # Upload functional test coverage reports for later use in the "reports" job. - - name: Upload functional test coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 + run: npm run test:functional if: matrix.test-suite == 'functional' smoke-tests: @@ -444,92 +423,14 @@ jobs: 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.4 - # with: - # run: node --no-force-async-hooks-checks ./out/test/standardTest.js - - coverage: - name: Coverage reports upload - runs-on: ubuntu-latest - if: github.repository == 'microsoft/vscode-python' - needs: [tests, smoke-tests] - defaults: - run: - working-directory: ${{env.special-working-directory}} - steps: - # Checkout the repo in the same way as how the tests are run, - # or nyc won't know how to reconcile the reports generated by the tests. - - 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 --prefer-offline - - # It isn't possible to specify a regex for artifact names, so we have to download each artifact manually. - # The name pattern is ${{runner.os}}-${{env.COVERAGE_REPORTS}}, and possible values for runner.os are `Linux`, `Windows`, or `macOS`. - # See https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#runner-context - - name: Download Ubuntu test coverage artifacts - uses: actions/download-artifact@v2 - with: - name: Linux-${{ env.COVERAGE_REPORTS }} - path: ${{env.special-working-directory}}/Linux-${{ env.COVERAGE_REPORTS }} - - - name: Extract Ubuntu coverage artifacts to ./nyc_output - run: | - mkdir .nyc_output - mv Linux-${{ env.COVERAGE_REPORTS }}/* .nyc_output - rm -r Linux-${{ env.COVERAGE_REPORTS }} - - - name: Generate coverage reports - run: npm run test:cover:report - continue-on-error: true - - # The only location supported by the codecov action is the workspace root. - # See https://github.com/codecov/codecov-action#arguments - - name: Move codecov.yml to root - run: | - mkdir $GITHUB_WORKSPACE/.github - mv .github/codecov.yml $GITHUB_WORKSPACE - - - name: Upload coverage to codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ${{env.special-working-directory}}/coverage/cobertura-coverage.xml - - upload: - name: Upload VSIX to Azure Blob Storage - if: github.repository == 'microsoft/vscode-python' - runs-on: ubuntu-latest - needs: [tests, smoke-tests, build-vsix] - env: - BLOB_CONTAINER_NAME: extension-builds - BLOB_NAME: ms-python-insiders.vsix - steps: - - name: Download VSIX - uses: actions/download-artifact@v2 - with: - name: ${{ env.ARTIFACT_NAME_VSIX }} - - name: Azure Login - uses: azure/login@v1 + - 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.4 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 - - 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 + run: node --no-force-async-hooks-checks ./out/test/standardTest.js diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml new file mode 100644 index 000000000000..e189160195cb --- /dev/null +++ b/.github/workflows/nightly-coverage.yml @@ -0,0 +1,274 @@ +name: Coverage + +on: + pull_request: + push: + branches-ignore: + - main + - release* + schedule: + # Run daily at midnight + - cron: '0 0 * * *' + +env: + 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: . + +jobs: + build-vsix: + name: Build VSIX + runs-on: ubuntu-latest + 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: 7 + + lint: + name: Lint + runs-on: ubuntu-latest + 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 + + - name: Use Python ${{env.PYTHON_VERSION}} + uses: actions/setup-python@v2 + with: + python-version: ${{env.PYTHON_VERSION}} + + - name: Run Black on Python code + run: | + python -m pip install -U black + python -m black . --check + 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 }} + env: + # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. + # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. + # See https://github.com/microsoft/ptvsd/issues/2068 + # At this point pinning is only needed for consistency. We no longer have TS debug adapter. + NODE_VERSION: 12.15.0 + + 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@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 + + - name: Compile + run: npx gulp prePublishNonBundle + + - name: Use Python ${{env.PYTHON_VERSION}} + uses: actions/setup-python@v2 + with: + python-version: ${{env.PYTHON_VERSION}} + + - 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 --no-user + # 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 functional test requirements + run: | + python -m pip install numpy + 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 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 + + # 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 + + # Run TypeScript unit tests only for Python 3.X. + - name: Run TypeScript unit tests + run: npm run test:unittests:cover + + # Run the Python tests in our codebase. + - 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.4 + 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.4 + with: + run: npm run testSingleWorkspace:cover + + - name: Run multi-workspace tests + env: + CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} + CI_DISABLE_AUTO_SELECTION: 1 + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testMultiWorkspace + + - name: Run debugger tests + env: + CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} + CI_DISABLE_AUTO_SELECTION: 1 + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testDebugger + + # 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 test coverage reports + uses: actions/upload-artifact@v2 + with: + name: ${{ runner.os }}-coverage-report-html + path: ./coverage + retention-days: 1 diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2cc09213234b..63388ae549ed 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -11,11 +11,8 @@ env: 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. - # 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-insiders-vsix VSIX_NAME: ms-python-insiders.vsix - COVERAGE_REPORTS: tests-coverage-reports 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. @@ -250,16 +247,7 @@ jobs: # Run TypeScript unit tests only for Python 3.X. - name: Run TypeScript unit tests - run: npm run test:unittests:cover - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) - - # Upload unit test coverage reports for later use in the "reports" job. - - name: Upload unit test coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 + run: npm run test:unittests if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) # Run the Python tests in our codebase. @@ -282,45 +270,17 @@ jobs: with: run: npm run testSingleWorkspace working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 2.) - - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{matrix.python}} - uses: GabrielBB/xvfb-action@v1.4 - with: - run: npm run testSingleWorkspace:cover - working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) - - # Upload venv tests coverage reports for later use in the "reports" job. - - name: Upload venv tests coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) + if: matrix.test-suite == 'venv' - name: Run single-workspace tests env: CI_PYTHON_VERSION: ${{matrix.python}} uses: GabrielBB/xvfb-action@v1.4 with: - run: npm run testSingleWorkspace:cover + run: npm run testSingleWorkspace working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'single-workspace' - # Upload single workspace tests coverage reports for later use in the "reports" job. - - name: Upload single workspace tests coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 - if: matrix.test-suite == 'single-workspace' - - name: Run multi-workspace tests env: CI_PYTHON_VERSION: ${{matrix.python}} @@ -337,38 +297,11 @@ jobs: with: run: npm run testDebugger working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'debugger' && startsWith(matrix.python, 2.) - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{matrix.python}} - uses: GabrielBB/xvfb-action@v1.4 - with: - run: npm run testDebugger:cover - working-directory: ${{env.special-working-directory}} - if: matrix.test-suite == 'debugger' && startsWith(matrix.python, 3.) - - # Upload debugger tests coverage reports for later use in the "reports" job. - - name: Upload debugger tests coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 - if: matrix.test-suite == 'debugger' && startsWith(matrix.python, 3.) + if: matrix.test-suite == 'debugger' # Run TypeScript functional tests - name: Run TypeScript functional tests - run: npm run test:functional:cover - if: matrix.test-suite == 'functional' - - # Upload functional test coverage reports for later use in the "reports" job. - - name: Upload functional test coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 + run: npm run test:functional if: matrix.test-suite == 'functional' smoke-tests: @@ -491,72 +424,14 @@ jobs: 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.4 - # with: - # run: node --no-force-async-hooks-checks ./out/test/standardTest.js - - coverage: - name: Coverage reports upload - # 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: [tests, smoke-tests] - 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] - - steps: - # Checkout the repo in the same way as how the tests are run, - # or nyc won't know how to reconcile the reports generated by the tests. - - 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 --prefer-offline - - # It isn't possible to specify a regex for artifact names, so we have to download each artifact manually. - # The name pattern is ${{runner.os}}-${{env.COVERAGE_REPORTS}}, and possible values for runner.os are `Linux`, `Windows`, or `macOS`. - # See https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#runner-context - - name: Download test coverage artifacts - uses: actions/download-artifact@v2 - with: - name: ${{ runner.os }}-${{ env.COVERAGE_REPORTS }} - path: ${{env.special-working-directory}}/${{ runner.os }}-${{ env.COVERAGE_REPORTS }} - - - name: Extract coverage artifacts to ./nyc_output - run: | - mkdir .nyc_output - mv ${{ runner.os }}-${{ env.COVERAGE_REPORTS }}/* .nyc_output - rm -r ${{ runner.os }}-${{ env.COVERAGE_REPORTS }} - shell: bash - - - name: Generate coverage reports - run: npm run test:cover:report - continue-on-error: true - - - name: Upload html test coverage reports - uses: actions/upload-artifact@v2 + - 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.4 with: - name: ${{ runner.os }}-coverage-report-html - path: ${{ env.special-working-directory }}/coverage - retention-days: 1 + run: node --no-force-async-hooks-checks ./out/test/standardTest.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f59ea2c5837..c87ac635235a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,6 @@ env: CACHE_PYTHONFILES: cache-pvsc-pythonFiles ARTIFACT_NAME_VSIX: ms-python-release-vsix VSIX_NAME: ms-python-release.vsix - COVERAGE_REPORTS: tests-coverage-reports TEST_RESULTS_DIRECTORY: . jobs: @@ -95,13 +94,6 @@ jobs: # See https://github.com/microsoft/ptvsd/issues/2068 # At this point pinning is only needed for consistency. We no longer have TS debug adapter. NODE_VERSION: 12.15.0 - # 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 @@ -115,8 +107,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - path: ${{env.special-working-directory-relative}} - name: Install Node uses: actions/setup-node@v2.1.5 @@ -240,7 +230,7 @@ jobs: # Run TypeScript unit tests only for Python 3.X. - name: Run TypeScript unit tests - run: npm run test:unittests:cover + run: npm run test:unittests if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) # Run the Python tests in our codebase. @@ -262,7 +252,6 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testSingleWorkspace - working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'venv' - name: Run single-workspace tests @@ -271,7 +260,6 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testSingleWorkspace - working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'single-workspace' - name: Run multi-workspace tests @@ -280,7 +268,6 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testMultiWorkspace - working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'multi-workspace' - name: Run debugger tests @@ -289,21 +276,11 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 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:cover - if: matrix.test-suite == 'functional' - - # Upload functional test coverage reports for later use in the "reports" job. - - name: Upload functional test coverage reports - uses: actions/upload-artifact@v2 - with: - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} - path: ${{ env.special-working-directory }}/.nyc_output - retention-days: 1 + run: npm run test:functional if: matrix.test-suite == 'functional' smoke-tests: From 6c76f059eae764b77fde5c31e5f43eaeec86ba27 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 24 Mar 2021 21:24:40 -0700 Subject: [PATCH 07/13] Remove start page from coverage --- build/.nycrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/.nycrc b/build/.nycrc index bfd7cfc2ad9e..b92a4f36785d 100644 --- a/build/.nycrc +++ b/build/.nycrc @@ -2,8 +2,7 @@ "extends": "@istanbuljs/nyc-config-typescript", "all": true, "include": [ - "src/client/**/*.ts", "out/client/**/*.js", - "src/startPage-ui/**/*.ts", "out/startPage-ui/**/*.js" + "src/client/**/*.ts", "out/client/**/*.js" ], "exclude": ["src/test/**/*.ts", "out/test/**/*.js"], "exclude-node-modules": true From d2d9a26b6148e7d53f04c484fed70a0aa0417c68 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 25 Mar 2021 12:06:42 -0700 Subject: [PATCH 08/13] Add back codecov --- .github/codecov.yml | 31 ++++ .github/workflows/nightly-coverage.yml | 14 ++ .github/workflows/pr-check.yml | 195 +++++++++++++++++++++++++ 3 files changed, 240 insertions(+) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000000..6242fe9ad403 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,31 @@ +codecov: + strict_yaml_branch: 'main' + notify: + require_ci_to_pass: yes + +coverage: + precision: 0 + round: down + range: '70...100' + + status: + project: + default: + informational: true + only_pulls: true + patch: yes + changes: no + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + branches: ['main'] + layout: 'diff, files' + behavior: default + require_changes: no diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index e189160195cb..1dd0c1ecef19 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -272,3 +272,17 @@ jobs: name: ${{ runner.os }}-coverage-report-html path: ./coverage retention-days: 1 + + # The only location supported by the codecov action is the workspace root. + # See https://github.com/codecov/codecov-action#arguments + - name: Move codecov.yml to root + run: | + mkdir $GITHUB_WORKSPACE/.github + mv .github/codecov.yml $GITHUB_WORKSPACE + + - name: Upload coverage to codecov + uses: codecov/codecov-action@v1 + with: + # Can't use the token to disambiguate since secrets aren't available from PR-triggered runs. + #token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage/cobertura-coverage.xml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 63388ae549ed..699052f76c79 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -435,3 +435,198 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: node --no-force-async-hooks-checks ./out/test/standardTest.js + + ### 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 }} + env: + # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. + # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. + # See https://github.com/microsoft/ptvsd/issues/2068 + # At this point pinning is only needed for consistency. We no longer have TS debug adapter. + NODE_VERSION: 12.15.0 + + strategy: + fail-fast: false + matrix: + # Only run coverage on linux for PRs + os: [ubuntu-latest] + + 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 + + - name: Compile + run: npx gulp prePublishNonBundle + + - name: Use Python ${{env.PYTHON_VERSION}} + uses: actions/setup-python@v2 + with: + python-version: ${{env.PYTHON_VERSION}} + + - 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 --no-user + # 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 functional test requirements + run: | + python -m pip install numpy + 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 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 + + # 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 + + # Run TypeScript unit tests only for Python 3.X. + - name: Run TypeScript unit tests + run: npm run test:unittests:cover + + # Run the Python tests in our codebase. + - 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.4 + 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.4 + with: + run: npm run testSingleWorkspace:cover + + - name: Run multi-workspace tests + env: + CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} + CI_DISABLE_AUTO_SELECTION: 1 + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testMultiWorkspace + + - name: Run debugger tests + env: + CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} + CI_DISABLE_AUTO_SELECTION: 1 + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testDebugger + + # 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 test coverage reports + uses: actions/upload-artifact@v2 + with: + name: ${{ runner.os }}-coverage-report-html + path: ./coverage + retention-days: 1 + + # The only location supported by the codecov action is the workspace root. + # See https://github.com/codecov/codecov-action#arguments + - name: Move codecov.yml to root + run: | + mkdir $GITHUB_WORKSPACE/.github + mv .github/codecov.yml $GITHUB_WORKSPACE + + - name: Upload coverage to codecov + uses: codecov/codecov-action@v1 + with: + # Can't use the token to disambiguate since secrets aren't available from PR-triggered runs. + #token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage/cobertura-coverage.xml From 18933df0b746c8ed65e0ecdd29a00af9302ff062 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 25 Mar 2021 12:47:42 -0700 Subject: [PATCH 09/13] No need to move codecov.yml --- .github/workflows/nightly-coverage.yml | 7 ------- .github/workflows/pr-check.yml | 7 ------- 2 files changed, 14 deletions(-) diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index 1dd0c1ecef19..f03dac44cd42 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -273,13 +273,6 @@ jobs: path: ./coverage retention-days: 1 - # The only location supported by the codecov action is the workspace root. - # See https://github.com/codecov/codecov-action#arguments - - name: Move codecov.yml to root - run: | - mkdir $GITHUB_WORKSPACE/.github - mv .github/codecov.yml $GITHUB_WORKSPACE - - name: Upload coverage to codecov uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 699052f76c79..bb471d66adf6 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -617,13 +617,6 @@ jobs: path: ./coverage retention-days: 1 - # The only location supported by the codecov action is the workspace root. - # See https://github.com/codecov/codecov-action#arguments - - name: Move codecov.yml to root - run: | - mkdir $GITHUB_WORKSPACE/.github - mv .github/codecov.yml $GITHUB_WORKSPACE - - name: Upload coverage to codecov uses: codecov/codecov-action@v1 with: From f356418dcdfb63619ed05e96abd89f10c64b3c00 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 25 Mar 2021 13:59:03 -0700 Subject: [PATCH 10/13] Ensure nightly coverage runs on schedule only --- .github/workflows/nightly-coverage.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index f03dac44cd42..d675f6f53e68 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -1,14 +1,9 @@ name: Coverage on: - pull_request: - push: - branches-ignore: - - main - - release* schedule: - # Run daily at midnight - - cron: '0 0 * * *' + # Run daily at 2:00 AM + - cron: '0 2 * * *' env: NODE_VERSION: 12.15.0 From 865d1548dfc22c988cddbe48b1ae46ce9324bde9 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 25 Mar 2021 14:04:36 -0700 Subject: [PATCH 11/13] Nightly should only run coverage --- .github/workflows/nightly-coverage.yml | 75 +------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index d675f6f53e68..d1dbe3de18dc 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -14,81 +14,8 @@ env: TEST_RESULTS_DIRECTORY: . jobs: - build-vsix: - name: Build VSIX - runs-on: ubuntu-latest - 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: 7 - - lint: - name: Lint - runs-on: ubuntu-latest - 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 - - - name: Use Python ${{env.PYTHON_VERSION}} - uses: actions/setup-python@v2 - with: - python-version: ${{env.PYTHON_VERSION}} - - - name: Run Black on Python code - run: | - python -m pip install -U black - python -m black . --check - working-directory: pythonFiles - - ### Non-smoke tests tests: - name: Tests + name: Tests with 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 }} env: From bfcb6926ce81df81763496f840293adf18f130ce Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 25 Mar 2021 19:46:35 -0700 Subject: [PATCH 12/13] Address comments --- .github/workflows/insiders.yml | 4 +-- .github/workflows/nightly-coverage.yml | 44 ++++++++++++-------------- .github/workflows/pr-check.yml | 44 ++++++++++++-------------- .github/workflows/release.yml | 17 ++++++++-- build/functional-test-requirements.txt | 1 + 5 files changed, 56 insertions(+), 54 deletions(-) diff --git a/.github/workflows/insiders.yml b/.github/workflows/insiders.yml index ee7716b57876..9320e86760f6 100644 --- a/.github/workflows/insiders.yml +++ b/.github/workflows/insiders.yml @@ -167,9 +167,7 @@ jobs: if: matrix.test-suite == 'debugger' && matrix.python == 2.7 - name: Install functional test requirements - run: | - python -m pip install numpy - python -m pip install --upgrade -r ./build/functional-test-requirements.txt + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt if: matrix.test-suite == 'functional' - name: Prepare pipenv for venv tests diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index d1dbe3de18dc..84553ff644a1 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -67,9 +67,7 @@ jobs: run: python -m pip install --upgrade -r build/test-requirements.txt - name: Install functional test requirements - run: | - python -m pip install numpy - python -m pip install --upgrade -r ./build/functional-test-requirements.txt + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - name: Prepare pipenv for venv tests env: @@ -130,11 +128,9 @@ jobs: & $condaExecPath create -p "./test_env2" -y python & $condaExecPath create -p "~/test_env3" -y python - # Run TypeScript unit tests only for Python 3.X. - name: Run TypeScript unit tests run: npm run test:unittests:cover - # Run the Python tests in our codebase. - name: Run Python unit tests run: | python pythonFiles/tests/run_all.py @@ -162,23 +158,24 @@ jobs: with: run: npm run testSingleWorkspace:cover - - name: Run multi-workspace tests - env: - CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.4 - with: - run: npm run testMultiWorkspace - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.4 - with: - run: npm run testDebugger + # 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.4 + # 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.4 + # with: + # run: npm run testDebugger:cover - # Run TypeScript functional tests - name: Run TypeScript functional tests env: CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} @@ -188,7 +185,7 @@ jobs: - name: Generate coverage reports run: npm run test:cover:report - - name: Upload html test coverage reports + - name: Upload HTML report uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-coverage-report-html @@ -198,6 +195,5 @@ jobs: - name: Upload coverage to codecov uses: codecov/codecov-action@v1 with: - # Can't use the token to disambiguate since secrets aren't available from PR-triggered runs. - #token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage/cobertura-coverage.xml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index bb471d66adf6..8f7b239cae70 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -170,9 +170,7 @@ jobs: if: matrix.test-suite == 'debugger' && matrix.python == 2.7 - name: Install functional test requirements - run: | - python -m pip install numpy - python -m pip install --upgrade -r ./build/functional-test-requirements.txt + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt if: matrix.test-suite == 'functional' - name: Prepare pipenv for venv tests @@ -489,9 +487,7 @@ jobs: run: python -m pip install --upgrade -r build/test-requirements.txt - name: Install functional test requirements - run: | - python -m pip install numpy - python -m pip install --upgrade -r ./build/functional-test-requirements.txt + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - name: Prepare pipenv for venv tests env: @@ -552,11 +548,9 @@ jobs: & $condaExecPath create -p "./test_env2" -y python & $condaExecPath create -p "~/test_env3" -y python - # Run TypeScript unit tests only for Python 3.X. - name: Run TypeScript unit tests run: npm run test:unittests:cover - # Run the Python tests in our codebase. - name: Run Python unit tests run: | python pythonFiles/tests/run_all.py @@ -584,21 +578,23 @@ jobs: with: run: npm run testSingleWorkspace:cover - - name: Run multi-workspace tests - env: - CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.4 - with: - run: npm run testMultiWorkspace - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{env.PYTHON_VERSION}} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.4 - with: - run: npm run testDebugger + # 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.4 + # 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.4 + # with: + # run: npm run testDebugger:cover # Run TypeScript functional tests - name: Run TypeScript functional tests @@ -610,7 +606,7 @@ jobs: - name: Generate coverage reports run: npm run test:cover:report - - name: Upload html test coverage reports + - name: Upload HTML report uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-coverage-report-html diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c87ac635235a..ebbcec09b61e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,6 +94,13 @@ jobs: # See https://github.com/microsoft/ptvsd/issues/2068 # At this point pinning is only needed for consistency. We no longer have TS debug adapter. NODE_VERSION: 12.15.0 + # 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 @@ -107,6 +114,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + path: ${{env.special-working-directory-relative}} - name: Install Node uses: actions/setup-node@v2.1.5 @@ -153,9 +162,7 @@ jobs: if: matrix.test-suite == 'debugger' && matrix.python == 2.7 - name: Install functional test requirements - run: | - python -m pip install numpy - python -m pip install --upgrade -r ./build/functional-test-requirements.txt + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt if: matrix.test-suite == 'functional' - name: Prepare pipenv for venv tests @@ -252,6 +259,7 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testSingleWorkspace + working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'venv' - name: Run single-workspace tests @@ -260,6 +268,7 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testSingleWorkspace + working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'single-workspace' - name: Run multi-workspace tests @@ -268,6 +277,7 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testMultiWorkspace + working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'multi-workspace' - name: Run debugger tests @@ -276,6 +286,7 @@ jobs: uses: GabrielBB/xvfb-action@v1.4 with: run: npm run testDebugger + working-directory: ${{env.special-working-directory}} if: matrix.test-suite == 'debugger' # Run TypeScript functional tests diff --git a/build/functional-test-requirements.txt b/build/functional-test-requirements.txt index d2f1977a7be4..d45208f671f4 100644 --- a/build/functional-test-requirements.txt +++ b/build/functional-test-requirements.txt @@ -1,2 +1,3 @@ # List of requirements for functional tests versioneer +numpy From 65bcc47edc22683acd89427de501fd07baa61e71 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 26 Mar 2021 00:16:43 -0700 Subject: [PATCH 13/13] Remove setting node version env for each job --- .github/workflows/insiders.yml | 6 ------ .github/workflows/nightly-coverage.yml | 11 ----------- .github/workflows/pr-check.yml | 13 ------------- .github/workflows/release.yml | 5 ----- 4 files changed, 35 deletions(-) diff --git a/.github/workflows/insiders.yml b/.github/workflows/insiders.yml index 9320e86760f6..3922556218e9 100644 --- a/.github/workflows/insiders.yml +++ b/.github/workflows/insiders.yml @@ -97,12 +97,6 @@ jobs: 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: - # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. - # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. - # See https://github.com/microsoft/ptvsd/issues/2068 - # At this point pinning is only needed for consistency. We no longer have TS debug adapter. - NODE_VERSION: 12.15.0 defaults: run: working-directory: ${{env.special-working-directory}} diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index 84553ff644a1..e4b08cd42b61 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -18,12 +18,6 @@ jobs: name: Tests with 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 }} - env: - # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. - # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. - # See https://github.com/microsoft/ptvsd/issues/2068 - # At this point pinning is only needed for consistency. We no longer have TS debug adapter. - NODE_VERSION: 12.15.0 strategy: fail-fast: false @@ -52,11 +46,6 @@ jobs: with: python-version: ${{env.PYTHON_VERSION}} - - 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 --no-user diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 8f7b239cae70..d76124c38c7b 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -97,12 +97,6 @@ jobs: 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: - # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. - # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. - # See https://github.com/microsoft/ptvsd/issues/2068 - # At this point pinning is only needed for consistency. We no longer have TS debug adapter. - NODE_VERSION: 12.15.0 defaults: run: working-directory: ${{env.special-working-directory}} @@ -439,13 +433,6 @@ jobs: 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 }} - env: - # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. - # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. - # See https://github.com/microsoft/ptvsd/issues/2068 - # At this point pinning is only needed for consistency. We no longer have TS debug adapter. - NODE_VERSION: 12.15.0 - strategy: fail-fast: false matrix: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebbcec09b61e..02e00dbf0a7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,11 +89,6 @@ jobs: # 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: - # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. - # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. - # See https://github.com/microsoft/ptvsd/issues/2068 - # At this point pinning is only needed for consistency. We no longer have TS debug adapter. - NODE_VERSION: 12.15.0 # 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'