diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 8b6b5556b29..6d536d58cef 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -4,8 +4,7 @@ name: Build and Test -permissions: - deployments: write +permissions: {} on: pull_request: @@ -51,207 +50,14 @@ jobs: # Make sure to cancel previous runs on a push cancel_previous_runs: runs-on: ubuntu-latest + permissions: + actions: write steps: - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 + uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 with: access_token: ${{ github.token }} - build-vsix: - name: Build VSIX - runs-on: ubuntu-latest - if: github.repository == 'microsoft/vscode-jupyter' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use Node ${{env.NODE_VERSION}} - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Npm ${{env.NPM_VERSION}} - run: npm i -g npm@${{env.NPM_VERSION}} - - - name: Use Python ${{env.PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.PYTHON_VERSION}} - - # Caching of npm packages (https://github.com/actions/cache/blob/main/examples.md#node---npm) - - name: Cache npm on linux/mac - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - run: npm i -g @vscode/vsce - - - name: Build VSIX - uses: ./.github/actions/build-vsix - id: build-vsix - - - uses: actions/upload-artifact@v4 - with: - name: 'ms-toolsai-jupyter-insiders.vsix' - path: 'ms-toolsai-jupyter-insiders.vsix' - - lint: - name: Lint - runs-on: ubuntu-latest - if: github.repository == 'microsoft/vscode-jupyter' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use Node ${{env.NODE_VERSION}} - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Npm ${{env.NPM_VERSION}} - run: npm i -g npm@${{env.NPM_VERSION}} - - - name: Cache pip files - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{runner.os}}-${{env.CACHE_PIP_DEPS}}-${{env.PYTHON_VERSION}} - - - name: Cache npm files - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{runner.os}}-${{env.CACHE_NPM_DEPS}}-${{hashFiles('package-lock.json')}} - - - name: Cache the out/ directory - uses: actions/cache@v4 - with: - path: ./out - key: ${{runner.os}}-${{env.CACHE_OUT_DIRECTORY}}-${{hashFiles('src/**')}} - - # This is faster than running `npm ci`, we do not want to build zmq, etc. - # Let that happen in other jobs, this job needs to be fast - - name: npm ci - run: npm ci --ignore-scripts --prefer-offline --no-audit - - - name: npm run postinstall - run: npm run postinstall - - - name: Verify Translation files - run: npm run validateTranslationFiles - - - name: Run linting on TypeScript code (eslint) - run: npm run lint - - - name: Run prettier on JavaScript code - run: npm run format-check - - - name: Use Python ${{env.PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.PYTHON_VERSION}} - - - name: Run Black on Python code - run: | - python -m pip install click==8.0.4 - python -m pip install -U black - python -m black . --check - working-directory: pythonFiles - - - name: Run gulp prePublishNonBundle - run: npm run prePublishNonBundle - - - name: Check dependencies - run: npm run checkDependencies - - - name: Check changes to package-lock.json - run: npx gulp validatePackageLockJson - - - name: Validate TELEMETRY files - run: npm run validateTelemetry - - - name: Verify usage of new Proposed API - if: github.event_name == 'pull_request' - run: npx tsx ./build/verifyProposedApiUsage.ts - env: - PULL_REQUEST_SHA: ${{ github.sha }} - BASE_SHA: ${{ github.event.pull_request.base.sha }} - - ts_tests: - name: Type Script Tests - runs-on: ${{ matrix.os }} - if: github.repository == 'microsoft/vscode-jupyter' - strategy: - fail-fast: false - matrix: - os: ['ubuntu-latest', 'windows-latest'] - test-suite: [ts-unit] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use Node ${{env.NODE_VERSION}} - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Npm ${{env.NPM_VERSION}} - run: npm i -g npm@${{env.NPM_VERSION}} - - # Caching of npm packages (https://github.com/actions/cache/blob/main/examples.md#node---npm) - - name: Cache npm on linux/mac - uses: actions/cache@v4 - if: matrix.os != 'windows-latest' - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Get npm cache directory - if: matrix.os == 'windows-latest' - id: npm-cache - run: | - echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - # - name: Cache npm on windows - # uses: actions/cache@v4 - # if: matrix.os == 'windows-latest' - # with: - # path: ${{ steps.npm-cache.outputs.dir }} - # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-node- - - - name: Cache compiled TS files - # Use an id for this step so that its cache-hit output can be accessed and checked in the next step. - id: out-cache - uses: actions/cache@v4 - with: - path: ./out - key: ${{runner.os}}-${{env.CACHE_OUT_DIRECTORY}}-${{hashFiles('src/**')}} - - # This is faster than running `npm ci`, we do not want to build zmq, etc. - # Let that happen in other jobs, this job needs to be fast - - name: npm ci - run: npm ci --ignore-scripts --prefer-offline --no-audit - - - name: npm run postinstall - run: npm run postinstall - - - name: Compile if not cached - run: npm run prePublishNonBundle - if: steps.out-cache.outputs.cache-hit != 'true' - - - name: Run TypeScript unit tests - id: test_unittests - run: npm run test:unittests - - - name: Verify there are no unhandled errors - run: npm run verifyUnhandledErrors - vscodeTests: name: Tests # These tests run with Python extension & real Jupyter runs-on: ${{ matrix.os }} @@ -262,7 +68,7 @@ jobs: strategy: fail-fast: false matrix: - jupyterConnection: [raw] # valid values include raw = uzing zqm, local = using local jupyter, remote = using remote jupyter, web = using remote jupyter in web mode + jupyterConnection: [web] # valid values include raw = uzing zqm, local = using local jupyter, remote = using remote jupyter, web = using remote jupyter in web mode python: [python] # valid values include python,conda,noPython pythonVersion: ['3.10'] # Whether we're using stable () or pre-release versions of Python packages. @@ -270,13 +76,7 @@ jobs: # Not pre-release versions of pandas, numpy or other such packages that are not core to Jupyter. packageVersion: [''] tags: [ - '^[^@]+$|@mandatory|@kernelCore|@python|@jupyter', - '@widgets', - '@iw', - '@webview|@export|@lsp|@variableViewer', - '@debugger', - '@notebookPerformance', # Disabled for now, separate PR this will be enabled via cron (want to make PR smaller) - '@executionPerformance' + '^[^@]+$|@mandatory' ] # 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. @@ -292,78 +92,12 @@ jobs: isScheduled: '' - tags: '@executionPerformance' # Run only as part of scheduled CI runs isScheduled: '' - include: - # Mandatory tests - - jupyterConnection: remote - python: python - pythonVersion: '3.10' - tags: '^[^@]+$|@mandatory' - os: ubuntu-latest - ipywidgetsVersion: '' - # - jupyterConnection: remote - # python: python - # pythonVersion: '3.10' - # packageVersion: 'prerelease' - # tags: '^[^@]+$|@mandatory' - # os: ubuntu-latest - # ipywidgetsVersion: '' - - jupyterConnection: web - python: python - pythonVersion: '3.10' - tags: '^[^@]+$|@mandatory' - os: ubuntu-latest - ipywidgetsVersion: '' - - jupyterConnection: raw - python: python - pythonVersion: '3.10' - tags: '^[^@]+$|@mandatory' - os: windows-latest - ipywidgetsVersion: '' - # IPyWidgets 8 - - jupyterConnection: raw - python: python - pythonVersion: '3.10' - tags: '@widgets' - os: ubuntu-latest - ipywidgetsVersion: '8' - - jupyterConnection: remote - python: python - pythonVersion: '3.10' - tags: '@widgets' - os: ubuntu-latest - ipywidgetsVersion: '8' - # Conda - - jupyterConnection: raw - python: conda - pythonVersion: '3.10' - tags: '^[^@]+$|@mandatory|@python' - os: ubuntu-latest - ipywidgetsVersion: '' - # Pre-Release Versions - # - jupyterConnection: raw - # python: python - # pythonVersion: '3.10' - # packageVersion: 'prerelease' - # tags: '^[^@]+$|@mandatory|@kernelCore|@python|@jupyter' - # os: ubuntu-latest - # ipywidgetsVersion: '' - # Without Python - - jupyterConnection: raw - python: noPython - tags: '@nonPython' - os: ubuntu-latest - ipywidgetsVersion: '' - # Misc - - jupyterConnection: remote - python: python - pythonVersion: '3.10' - tags: '@kernelCore' - os: ubuntu-latest - ipywidgetsVersion: '' steps: - name: Checkout uses: actions/checkout@v4 + with: + persist-credentials: false - name: Generate Tag Variable run: echo "TAGSVAR=${{ matrix.tags }}}" >> $GITHUB_ENV @@ -381,7 +115,7 @@ jobs: python-version: ${{matrix.pythonVersion}} - name: Install Conda environment from environment.yml - uses: mamba-org/setup-micromamba@v2 + uses: mamba-org/setup-micromamba@b09ef9b599704322748535812ca03efb2625677b # v2.0.5 if: matrix.python == 'conda' with: cache-downloads: true @@ -572,9 +306,9 @@ jobs: if: matrix.jupyterConnection != 'web' run: npm run postinstall - - name: Install screen capture dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt-get install --fix-missing imagemagick x11-xserver-utils + # - name: Install screen capture dependencies + # if: matrix.os == 'ubuntu-latest' + # run: sudo apt-get update && sudo apt-get install --fix-missing imagemagick x11-xserver-utils # This step is slow. - name: Compile # if not cached @@ -595,7 +329,7 @@ jobs: # Used by tests for non-python kernels. # Test are enabled via env variable `VSC_JUPYTER_CI_RUN_NON_PYTHON_NB_TEST` - name: Install Deno - uses: denoland/setup-deno@v2 + uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2 if: matrix.tags != '@notebookPerformance' with: deno-version: ${{ env.DENO_VERSION}} @@ -641,7 +375,7 @@ jobs: run: echo "xvfbCommand=--server-args=\"-screen 0 1024x768x24\"" >> $GITHUB_ENV - name: Run Native Notebook with VSCode & Jupyter (ubuntu) - uses: GabrielBB/xvfb-action@v1.7 + uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7 with: run: ${{ env.xvfbCommand }} npm run testNativeNotebooksInVSCode env: @@ -658,7 +392,7 @@ jobs: if: matrix.python != 'noPython' && matrix.os == 'ubuntu-latest' && matrix.jupyterConnection != 'web' && matrix.tags != '@notebookPerformance' - name: Run Notebook Perf Test Without Jupyter - uses: GabrielBB/xvfb-action@v1.7 + uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7 with: run: ${{ env.xvfbCommand }} npm run testPerfInVSCode env: @@ -678,7 +412,7 @@ jobs: if: matrix.tags == '@notebookPerformance' - name: Run Execution Perf Test With Jupyter - uses: GabrielBB/xvfb-action@v1.7 + uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7 with: run: ${{ env.xvfbCommand }} npm run testExecPerfInVSCode env: @@ -702,7 +436,7 @@ jobs: VSC_JUPYTER_CI_TEST_GREP: ${{ matrix.tags }} - name: Run Native Notebook with VSCode & Jupyter (web) - uses: GabrielBB/xvfb-action@v1.7 + uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7 with: run: npm run testWebExtension env: @@ -736,7 +470,7 @@ jobs: if: matrix.python != 'noPython' && matrix.os == 'windows-latest' && matrix.jupyterConnection != 'web' - name: Run Native Notebook with VSCode & Jupyter (without Python) - uses: GabrielBB/xvfb-action@v1.7 + uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7 with: run: ${{ env.xvfbCommand }} npm run testNativeNotebooksWithoutPythonInVSCode env: @@ -769,74 +503,3 @@ jobs: - name: Verify there are no unhandled errors run: npm run verifyUnhandledErrors - - smoke-tests: - timeout-minutes: 30 - 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-jupyter' - needs: [build-vsix] - env: - VSIX_NAME: 'ms-toolsai-jupyter-insiders.vsix' - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python: ['3.10'] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use Python ${{matrix.python}} - uses: actions/setup-python@v5 - id: setupPythonVersion - with: - python-version: ${{matrix.python}} - - - name: Set CI Path - shell: bash - run: echo "CI_PYTHON_PATH=${{ steps.setupPythonVersion.outputs.python-path }}" >> $GITHUB_ENV - - - name: Use Node ${{env.NODE_VERSION}} - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Use Npm ${{env.NPM_VERSION}} - run: npm i -g npm@${{env.NPM_VERSION}} - - - name: Download VSIX - uses: actions/download-artifact@v4 - with: - name: 'ms-toolsai-jupyter-insiders.vsix' - - # This is faster than running `npm ci`, we do not want to build zmq, etc. - # Let that happen in other jobs, this job needs to be fast - - name: npm ci - run: npm ci --ignore-scripts --prefer-offline --no-audit - - # Run again, as the download of zmq binaries could have failed with 403 errors - - run: npm run postinstall - env: - GITHUB_TOKEN: ${{ github.token }} - shell: bash - - - name: pip install system test requirements - run: | - python -m pip install --upgrade -r build/venv-smoke-test-requirements.txt - shell: bash - - # Compile the test files. - - name: Prepare for smoke tests - run: npx tsc -p ./ - shell: bash - - - name: Run desktop smoke tests - env: - DISPLAY: 10 - VSC_JUPYTER_FORCE_LOGGING: 1 - VSC_JUPYTER_CI_TEST_VSC_CHANNEL: 'insiders' - uses: GabrielBB/xvfb-action@v1.7 - with: - run: npm run testSmokeLogged diff --git a/build/launchWebUtils.js b/build/launchWebUtils.js index 7198117b971..01f668dcc98 100644 --- a/build/launchWebUtils.js +++ b/build/launchWebUtils.js @@ -66,7 +66,11 @@ exports.launch = async function launch(launchTests) { port, headless: isCI ? false : false, // Set this to false to debug failures (false on CI to support capturing screenshots when tests fail). extensionDevelopmentPath, - folderPath: path.resolve(__dirname, '..', 'src', 'test', 'datascience') + folderPath: path.resolve(__dirname, '..', 'src', 'test', 'datascience'), + quality: 'insiders', + // commit: '16ee4a72cebe007cc3f25d139bb379c3a1a27ea9' + // commit: '83d1ff749141e435b3b135079a02f8f515621eec' + commit: 'dac0c97d082bd3bf38fdb3251e955e25c7c992a0' }; if (launchTests) { options.extensionTestsPath = bundlePath; diff --git a/package-lock.json b/package-lock.json index d56b08babe6..0290a4887ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -229,7 +229,7 @@ "webpack-cli": "^5.1.4" }, "engines": { - "vscode": "^1.100.0" + "vscode": "^1.99.0" }, "optionalDependencies": { "fsevents": "^2.3.2" diff --git a/package.json b/package.json index b1f1f3249f6..7205ce76485 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "theme": "light" }, "engines": { - "vscode": "^1.100.0" + "vscode": "^1.98.0" }, "l10n": "./l10n", "extensionKind": [ diff --git a/src/test/standardTest.node.ts b/src/test/standardTest.node.ts index a122b760970..dfec89a509a 100644 --- a/src/test/standardTest.node.ts +++ b/src/test/standardTest.node.ts @@ -52,9 +52,10 @@ function isNotebookPerfTestWithoutJupyter() { return !!process.env.VSC_JUPYTER_NOTEBOOK_PERF_TEST; } -const channel = (process.env.VSC_JUPYTER_CI_TEST_VSC_CHANNEL || '').toLowerCase().includes('insiders') - ? 'insiders' - : 'stable'; +// const channel = '83d1ff749141e435b3b135079a02f8f515621eec'; +// const channel = '2ba158ca779b715bd4d29d1cb6ac022b27672b26'; +const channel = '1.99.0'; +// const channel = '17baf841131aa23349f217ca7c570c76ee87b957'; function computePlatform() { switch (process.platform) {