Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ insert_final_newline = true
[{.travis.yml,npm-shrinkwrap.json,package.json}]
indent_style = space
indent_size = 4

[.github/{workflows,actions}/*.yml]
indent_style = space
indent_size = 2
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,44 @@ jobs:
- name: Run spell check
run: npm run spell-check

integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
id-token: write
contents: read
packages: read
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
cache: 'npm'
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://npm.pkg.github.com'
scope: '@deepnote'

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.12'

- name: Install dependencies
run: npm ci --prefer-offline --no-audit
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Compile TypeScript
run: npm run compile

- name: Run integration tests
run: xvfb-run -a -s "-screen 0 1024x768x24" npm run test:integration
# env:
# VSC_JUPYTER_CI_TEST_GREP: 'Deepnote Integration Tests'

audit-prod:
name: Audit - Production
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion src/notebooks/deepnote/deepnoteExplorerView.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { injectable, inject } from 'inversify';
import { commands, window, workspace, type TreeView, Uri, l10n } from 'vscode';
import * as yaml from 'js-yaml';
import { convertIpynbFilesToDeepnoteFile } from '@deepnote/convert';
// NOTE: Use dynamic import for '@deepnote/convert' to avoid activation failures in test hosts
// where the package may not be resolvable. We only import it when needed.

import { IExtensionContext } from '../../platform/common/types';
import { IDeepnoteNotebookManager } from '../types';
Expand Down Expand Up @@ -357,6 +358,7 @@ export class DeepnoteExplorerView {
const outputFileName = `${projectName}.deepnote`;
const outputPath = Uri.joinPath(workspaceFolder.uri, outputFileName).path;

const { convertIpynbFilesToDeepnoteFile } = await import('@deepnote/convert');
await convertIpynbFilesToDeepnoteFile(inputFilePaths, {
outputPath: outputPath,
projectName: projectName
Expand Down Expand Up @@ -429,6 +431,7 @@ export class DeepnoteExplorerView {
// File doesn't exist, continue
}

const { convertIpynbFilesToDeepnoteFile } = await import('@deepnote/convert');
await convertIpynbFilesToDeepnoteFile(inputFilePaths, {
outputPath: outputUri.path,
projectName: projectName
Expand Down
2 changes: 1 addition & 1 deletion src/test/constants.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const EXTENSION_TEST_DIR_FOR_FILES = path.join(
'datascience',
'temp'
);
export const JVSC_EXTENSION_ID_FOR_TESTS = 'ms-toolsai.jupyter';
export const JVSC_EXTENSION_ID_FOR_TESTS = 'Deepnote.vscode-deepnote';

export const SMOKE_TEST_EXTENSIONS_DIR = path.join(
EXTENSION_ROOT_DIR_FOR_TESTS,
Expand Down
2 changes: 1 addition & 1 deletion src/test/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

export const JVSC_EXTENSION_ID_FOR_TESTS = 'ms-toolsai.jupyter';
export const JVSC_EXTENSION_ID_FOR_TESTS = 'Deepnote.vscode-deepnote';
export const PerformanceExtensionId = 'ms-toolsai.vscode-notebook-perf';

export type TestSettingsType = {
Expand Down
6 changes: 3 additions & 3 deletions src/test/datascience/setupTestEnvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ python --version
python -c "import sys;print(sys.executable)"
uv pip install ipykernel
python -m ipykernel install --user --name .venvkernel --display-name .venvkernel
uv pip uninstall jedi --yes
uv pip uninstall jedi
uv pip install jedi==0.17.2
uv pip install ipywidgets==7.7.2

Expand All @@ -16,6 +16,6 @@ python --version
python -c "import sys;print(sys.executable)"
uv pip install ipykernel
python -m ipykernel install --user --name .venvnokernel --display-name .venvnokernel
uv pip uninstall jedi --yes
uv pip uninstall jedi
uv pip install jedi==0.17.2
uv pip uninstall ipykernel --yes
uv pip uninstall ipykernel
Loading