|
9 | 9 | NODE_VERSION: 12.15.0 |
10 | 10 | PYTHON_VERSION: 3.9 |
11 | 11 | 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. |
12 | | - # Key for the cache created at the end of the the 'Cache ./pythonFiles/lib/python' step. |
13 | | - CACHE_PYTHONFILES: cache-pvsc-pythonFiles |
14 | 12 | ARTIFACT_NAME_VSIX: ms-python-insiders-vsix |
15 | 13 | VSIX_NAME: ms-python-insiders.vsix |
16 | | - COVERAGE_REPORTS: tests-coverage-reports |
17 | 14 | TEST_RESULTS_DIRECTORY: . |
18 | 15 | # Force a path with spaces and to test extension works in these scenarios |
19 | 16 | # Unicode characters are causing 2.7 failures so skip that for now. |
@@ -100,12 +97,6 @@ jobs: |
100 | 97 | name: Tests |
101 | 98 | # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. |
102 | 99 | runs-on: ${{ matrix.os }} |
103 | | - env: |
104 | | - # Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1. |
105 | | - # We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136. |
106 | | - # See https://github.com/microsoft/ptvsd/issues/2068 |
107 | | - # At this point pinning is only needed for consistency. We no longer have TS debug adapter. |
108 | | - NODE_VERSION: 12.15.0 |
109 | 100 | defaults: |
110 | 101 | run: |
111 | 102 | working-directory: ${{env.special-working-directory}} |
@@ -170,9 +161,7 @@ jobs: |
170 | 161 | if: matrix.test-suite == 'debugger' && matrix.python == 2.7 |
171 | 162 |
|
172 | 163 | - name: Install functional test requirements |
173 | | - run: | |
174 | | - python -m pip install numpy |
175 | | - python -m pip install --upgrade -r ./build/functional-test-requirements.txt |
| 164 | + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt |
176 | 165 | if: matrix.test-suite == 'functional' |
177 | 166 |
|
178 | 167 | - name: Prepare pipenv for venv tests |
@@ -247,16 +236,7 @@ jobs: |
247 | 236 |
|
248 | 237 | # Run TypeScript unit tests only for Python 3.X. |
249 | 238 | - name: Run TypeScript unit tests |
250 | | - run: npm run test:unittests:cover |
251 | | - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) |
252 | | - |
253 | | - # Upload unit test coverage reports for later use in the "reports" job. |
254 | | - - name: Upload unit test coverage reports |
255 | | - uses: actions/upload-artifact@v2 |
256 | | - with: |
257 | | - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} |
258 | | - path: ${{ env.special-working-directory }}/.nyc_output |
259 | | - retention-days: 1 |
| 239 | + run: npm run test:unittests |
260 | 240 | if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) |
261 | 241 |
|
262 | 242 | # Run the Python tests in our codebase. |
@@ -310,16 +290,7 @@ jobs: |
310 | 290 |
|
311 | 291 | # Run TypeScript functional tests |
312 | 292 | - name: Run TypeScript functional tests |
313 | | - run: npm run test:functional:cover |
314 | | - if: matrix.test-suite == 'functional' |
315 | | - |
316 | | - # Upload functional test coverage reports for later use in the "reports" job. |
317 | | - - name: Upload functional test coverage reports |
318 | | - uses: actions/upload-artifact@v2 |
319 | | - with: |
320 | | - name: ${{runner.os}}-${{env.COVERAGE_REPORTS}} |
321 | | - path: ${{ env.special-working-directory }}/.nyc_output |
322 | | - retention-days: 1 |
| 293 | + run: npm run test:functional |
323 | 294 | if: matrix.test-suite == 'functional' |
324 | 295 |
|
325 | 296 | smoke-tests: |
@@ -444,92 +415,14 @@ jobs: |
444 | 415 | echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV |
445 | 416 | shell: bash |
446 | 417 |
|
447 | | - # - name: Run insider tests |
448 | | - # env: |
449 | | - # DISPLAY: 10 |
450 | | - # INSTALL_JUPYTER_EXTENSION: true |
451 | | - # INSTALL_PYLANCE_EXTENSION: true |
452 | | - # VSC_PYTHON_CI_TEST_VSC_CHANNEL: insiders |
453 | | - # TEST_FILES_SUFFIX: insiders.test |
454 | | - # CODE_TESTS_WORKSPACE: ./src/testMultiRootWkspc/smokeTests |
455 | | - # uses: GabrielBB/xvfb-action@v1.4 |
456 | | - # with: |
457 | | - # run: node --no-force-async-hooks-checks ./out/test/standardTest.js |
458 | | - |
459 | | - coverage: |
460 | | - name: Coverage reports upload |
461 | | - runs-on: ubuntu-latest |
462 | | - if: github.repository == 'microsoft/vscode-python' |
463 | | - needs: [tests, smoke-tests] |
464 | | - defaults: |
465 | | - run: |
466 | | - working-directory: ${{env.special-working-directory}} |
467 | | - steps: |
468 | | - # Checkout the repo in the same way as how the tests are run, |
469 | | - # or nyc won't know how to reconcile the reports generated by the tests. |
470 | | - - name: Checkout |
471 | | - uses: actions/checkout@v2 |
472 | | - with: |
473 | | - path: ${{env.special-working-directory-relative}} |
474 | | - |
475 | | - - name: Install Node |
476 | | - uses: actions/setup-node@v2.1.5 |
477 | | - with: |
478 | | - node-version: ${{env.NODE_VERSION}} |
479 | | - |
480 | | - - name: Install dependencies (npm ci) |
481 | | - run: npm ci --prefer-offline |
482 | | - |
483 | | - # It isn't possible to specify a regex for artifact names, so we have to download each artifact manually. |
484 | | - # The name pattern is ${{runner.os}}-${{env.COVERAGE_REPORTS}}, and possible values for runner.os are `Linux`, `Windows`, or `macOS`. |
485 | | - # See https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#runner-context |
486 | | - - name: Download Ubuntu test coverage artifacts |
487 | | - uses: actions/download-artifact@v2 |
488 | | - with: |
489 | | - name: Linux-${{ env.COVERAGE_REPORTS }} |
490 | | - path: ${{env.special-working-directory}}/Linux-${{ env.COVERAGE_REPORTS }} |
491 | | - |
492 | | - - name: Extract Ubuntu coverage artifacts to ./nyc_output |
493 | | - run: | |
494 | | - mkdir .nyc_output |
495 | | - mv Linux-${{ env.COVERAGE_REPORTS }}/* .nyc_output |
496 | | - rm -r Linux-${{ env.COVERAGE_REPORTS }} |
497 | | -
|
498 | | - - name: Generate coverage reports |
499 | | - run: npm run test:cover:report |
500 | | - continue-on-error: true |
501 | | - |
502 | | - # The only location supported by the codecov action is the workspace root. |
503 | | - # See https://github.com/codecov/codecov-action#arguments |
504 | | - - name: Move codecov.yml to root |
505 | | - run: | |
506 | | - mkdir $GITHUB_WORKSPACE/.github |
507 | | - mv .github/codecov.yml $GITHUB_WORKSPACE |
508 | | -
|
509 | | - - name: Upload coverage to codecov |
510 | | - uses: codecov/codecov-action@v1 |
511 | | - with: |
512 | | - token: ${{ secrets.CODECOV_TOKEN }} |
513 | | - file: ${{env.special-working-directory}}/coverage/cobertura-coverage.xml |
514 | | - |
515 | | - upload: |
516 | | - name: Upload VSIX to Azure Blob Storage |
517 | | - if: github.repository == 'microsoft/vscode-python' |
518 | | - runs-on: ubuntu-latest |
519 | | - needs: [tests, smoke-tests, build-vsix] |
520 | | - env: |
521 | | - BLOB_CONTAINER_NAME: extension-builds |
522 | | - BLOB_NAME: ms-python-insiders.vsix |
523 | | - steps: |
524 | | - - name: Download VSIX |
525 | | - uses: actions/download-artifact@v2 |
526 | | - with: |
527 | | - name: ${{ env.ARTIFACT_NAME_VSIX }} |
528 | | - - name: Azure Login |
529 | | - uses: azure/login@v1 |
| 418 | + - name: Run insider tests |
| 419 | + env: |
| 420 | + DISPLAY: 10 |
| 421 | + INSTALL_JUPYTER_EXTENSION: true |
| 422 | + INSTALL_PYLANCE_EXTENSION: true |
| 423 | + VSC_PYTHON_CI_TEST_VSC_CHANNEL: insiders |
| 424 | + TEST_FILES_SUFFIX: insiders.test |
| 425 | + CODE_TESTS_WORKSPACE: ./src/testMultiRootWkspc/smokeTests |
| 426 | + uses: GabrielBB/xvfb-action@v1.4 |
530 | 427 | with: |
531 | | - creds: ${{ secrets.AZURE_CREDENTIALS }} |
532 | | - - name: Upload to Blob Storage |
533 | | - 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 |
534 | | - - name: Get URL to uploaded VSIX |
535 | | - run: az storage blob url --account-name pvsc --container-name ${{ env.BLOB_CONTAINER_NAME }} --name ${{ env.BLOB_NAME }} --auth-mode login |
| 428 | + run: node --no-force-async-hooks-checks ./out/test/standardTest.js |
0 commit comments