⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Melvin0070
Copy link

@Melvin0070 Melvin0070 commented Jan 12, 2026

Description

Implements #216 - Run integration tests in CI

This PR adds a new integration-tests job to the CI workflow that runs VS Code extension integration tests on every PR and push to main.

Changes

  • Added integration-tests job to .github/workflows/ci.yml
  • Job runs after build completes successfully
  • Uses xvfb for headless VS Code on Linux
  • Sets up Python 3.11 with ipykernel using existing composite actions
  • Uploads test artifacts (screenshots, logs) on failure
  • Can be skipped by adding [skip-integration] to commit message

Testing

  • YAML syntax validated
  • Follows existing CI patterns
  • Full integration test run

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • My changes generate no new warnings

Summary by CodeRabbit

  • Chores
    • Enhanced CI pipeline with automated integration testing that runs after builds.
    • Integration tests can be skipped by including “[skip-integration]” in commit messages or PR titles.
    • Test results and failure artifacts are automatically captured and uploaded for review.
    • Note: an identical integration test job was added twice (duplicate entry).

✏️ Tip: You can customize this high-level summary in your review settings.

Closes deepnote#216
- Add new integration-tests job that runs after build
- Setup Python 3.11 with xvfb for headless VS Code
- Use existing create-venv-for-tests composite action
- Upload test artifacts (screenshots, logs) on failure
- Allow skipping with [skip-integration] in commit message
Copilot AI review requested due to automatic review settings January 12, 2026 11:59
@Melvin0070 Melvin0070 requested a review from a team as a code owner January 12, 2026 11:59
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

A new integration-tests job is added to the CI workflow, running after build with a 60-minute timeout and skipped when PR title or commit message contains [skip-integration]. The job checks out code, sets up Node.js and Python environments (with caching), installs npm deps with Linux-specific fallbacks for native modules, compiles TypeScript, creates/configures a Python test virtualenv, installs xvfb for headless operation, runs integration tests inside a headless X server, and uploads test results and artifacts on failure. The integration-tests block appears twice identically in the workflow file.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions as GitHub Actions Runner
  participant Checkout as Repository Checkout
  participant Node as Node.js/npm
  participant Python as Python/venv/pytest
  participant Xvfb as Xvfb (headless X server)
  participant Artifacts as Artifact Storage

  GitHubActions->>Checkout: checkout code
  GitHubActions->>Node: setup Node.js, restore/cache deps
  Node->>Node: install npm deps (with Linux fallbacks)
  Node->>GitHubActions: compilation (TypeScript)
  GitHubActions->>Python: setup Python, create venv, install test deps
  GitHubActions->>Xvfb: install/start Xvfb for headless tests
  Python->>Xvfb: run integration tests (headless)
  Python->>Artifacts: on failure upload test results/screenshots
  GitHubActions->>Artifacts: upload logs/artifacts
Loading
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title directly matches the main changeset: adding integration tests job to CI workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds integration tests to the CI workflow, enabling automated VS Code extension integration testing on every PR and push to main. The implementation follows existing CI patterns and introduces proper headless testing support using xvfb on Linux.

Changes:

  • Added new integration-tests job that runs after successful build
  • Configured headless VS Code testing environment with xvfb and required dependencies
  • Set up Python 3.11 with test virtual environments using composite actions
  • Added artifact uploads for test results, logs, and screenshots on failure
  • Included skip condition via [skip-integration] commit message tag

Comment on lines 202 to 212
- name: Upload screenshots on failure
if: failure()
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
with:
name: integration-test-screenshots
path: |
**/*screenshot*.png
**/*Screen*.png
retention-days: 7
if-no-files-found: ignore

Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first artifact upload already includes all PNG files with the pattern '**/*.png' (line 199). This second upload step for screenshots is redundant and will capture the same files, resulting in duplicate artifacts.

Suggested change
- name: Upload screenshots on failure
if: failure()
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
with:
name: integration-test-screenshots
path: |
**/*screenshot*.png
**/*Screen*.png
retention-days: 7
if-no-files-found: ignore

Copilot uses AI. Check for mistakes.
Comment on lines 187 to 188
TEST_FILES_SUFFIX: '*.vscode.test,*.vscode.common.test'
CODE_TESTS_WORKSPACE: 'src/test/datascience'
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variables TEST_FILES_SUFFIX and CODE_TESTS_WORKSPACE are already set in the test:integration script in package.json (line 2589). Setting them again here is redundant. Consider removing these environment variables or document why they need to be overridden.

Suggested change
TEST_FILES_SUFFIX: '*.vscode.test,*.vscode.common.test'
CODE_TESTS_WORKSPACE: 'src/test/datascience'

Copilot uses AI. Check for mistakes.
VSC_JUPYTER_CI_TEST: '1'
TEST_FILES_SUFFIX: '*.vscode.test,*.vscode.common.test'
CODE_TESTS_WORKSPACE: 'src/test/datascience'
DISPLAY: ':99'
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DISPLAY environment variable is unnecessary when using 'xvfb-run --auto-servernum' as it automatically manages the display. The --auto-servernum flag already handles display selection, making this explicit setting redundant.

Suggested change
DISPLAY: ':99'

Copilot uses AI. Check for mistakes.
- name: Install npm dependencies
run: |
npm ci --prefer-offline --no-audit
# Verify Tailwind CSS native modules are installed for Linux
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on this line should match the more complete comment in the build job (lines 102-103) which includes a reference to the npm issue. The comment should be: "Verify Tailwind CSS native modules are installed for Linux (npm optional deps bug)" followed by "See: npm/cli#4828" on the next line for consistency.

Suggested change
# Verify Tailwind CSS native modules are installed for Linux
# Verify Tailwind CSS native modules are installed for Linux (npm optional deps bug)
# See: https://github.com/npm/cli/issues/4828

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 184-189: The DISPLAY env var is redundant because xvfb-run
--auto-servernum sets and exports DISPLAY itself; remove the DISPLAY: ':99'
environment variable from the CI job OR alternatively stop using
--auto-servernum and change xvfb-run to use a fixed display number (e.g.,
replace --auto-servernum with -n 99) so the explicit DISPLAY matches the chosen
server number; update the command/env accordingly around the xvfb-run
invocation.
- Line 143: Replace the brittle skip-condition that only checks
github.event.head_commit.message with a fallback that also checks the PR title
(or an empty string) so PR synchronize events work; update the if expression
used in the workflow (the `if: "!contains(github.event.head_commit.message,
'[skip-integration]')"` line) to something like `if:
"!contains(github.event.pull_request.title || github.event.head_commit.message
|| '', '[skip-integration]')"` so the check uses the pull_request title when
head_commit.message is null.
- Around line 191-211: The two GitHub Actions steps "Upload test results on
failure" and "Upload screenshots on failure" both run on failure() and both
upload .png files, causing redundancy; either remove the redundant step or
narrow the patterns so they don't overlap. Fix by editing the artifact upload
steps: either delete the "Upload screenshots on failure" step entirely and keep
the unified paths in "Upload test results on failure" (ensure name reflects
screenshots if kept), or remove **/*.png from the "Upload test results on
failure" step and leave the "Upload screenshots on failure" step as the sole
uploader for screenshot patterns (**/*screenshot*.png, **/*Screen*.png) with
if-no-files-found: ignore; update the artifact names accordingly to avoid
duplicate uploads.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3f44449 and a4a4fc1.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🔇 Additional comments (4)
.github/workflows/ci.yml (4)

138-142: Job setup looks good.

Reasonable timeout, proper dependency on build, and consistent action versions with the rest of the workflow.


144-168: Standard CI setup steps.

Node/Python caching and dependency installation follow existing patterns. The Tailwind native module fallback matches the build job.


178-181: Headless dependencies are appropriate.

Correct package set for running VS Code under xvfb on Ubuntu.


170-176: Composite actions are present and properly configured.

Both .github/actions/create-venv-for-tests and .github/actions/set-python exist with valid action.yml configurations. The IPyWidgetVersion: '8' parameter matches the expected input definition.

- Fix skip condition for PR events
- Remove redundant env vars (handled by npm script)
- Consolidate artifact uploads
- Add npm issue reference
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 156-160: The CI job step named "Setup Python" currently uses with:
cache: 'pip' which is ineffective because there is no root-level dependency
file; either add a root-level dependency file (e.g., requirements.txt or
pyproject.toml) containing the repo's Python dependencies (or create a small
file that imports/includes build/venv-test-ipywidgets8-requirements.txt or
references pythonFiles/pyproject.toml) so the actions/setup-python cache can
detect and key by it, or remove the cache: 'pip' line from the "Setup Python"
step to disable pip caching; update the workflow step accordingly and ensure the
change references the same step name ("Setup Python") in
.github/workflows/ci.yml.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a4a4fc1 and 427ce17.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🔇 Additional comments (6)
.github/workflows/ci.yml (6)

138-145: Job definition and skip condition look correct.

The if condition properly handles both PR events (checking title) and push events (checking commit message) via fallback. Timeout and dependency on build are sensible.


162-171: Consistent with build job pattern.

Dependency installation and TypeScript compilation follow the same approach as the existing build job, including the npm optional deps workaround.


181-189: xvfb setup and test execution look solid.

Library dependencies for headless VS Code are comprehensive. The screen resolution (1920x1080x24) is appropriate for UI testing.


191-201: Artifact upload configured well.

if: failure() with if-no-files-found: ignore is a safe combination. 7-day retention is reasonable for debugging flaky tests.


173-179: No action needed—both composite actions exist. The referenced actions ./.github/actions/create-venv-for-tests and ./.github/actions/set-python are present in the repository.


138-201: No duplication exists. The integration-tests job appears only once in the workflow file. The AI summary's claim of identical duplicate blocks is unfounded.

Likely an incorrect or invalid review comment.

Comment on lines +156 to +160
- name: Setup Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: '3.11'
cache: 'pip'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for pip dependency files that setup-python can use for caching
fd -t f -g 'requirements*.txt' -g 'pyproject.toml' -g 'setup.py' -g 'Pipfile.lock' -d 2

Repository: deepnote/vscode-deepnote

Length of output: 283


🏁 Script executed:

#!/bin/bash
# Search for Python dependency files
fd -t f 'requirements' -d 2
fd -t f 'pyproject\.toml' -d 2
fd -t f 'setup\.py' -d 2
fd -t f 'Pipfile\.lock' -d 2

Repository: deepnote/vscode-deepnote

Length of output: 173


🏁 Script executed:

#!/bin/bash
# Check the workflow file context around the Python setup
sed -n '150,180p' .github/workflows/ci.yml

Repository: deepnote/vscode-deepnote

Length of output: 1259


The pip cache setting is ineffective without a root-level dependency file.

The cache: 'pip' setting looks for requirements.txt, pyproject.toml, setup.py, or Pipfile.lock at the repository root to generate a cache key. The only Python dependency files in this repo are in subdirectories (build/venv-test-ipywidgets8-requirements.txt, pythonFiles/pyproject.toml). Move or create a root-level dependency file, or remove the cache setting.

🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 156 - 160, The CI job step named
"Setup Python" currently uses with: cache: 'pip' which is ineffective because
there is no root-level dependency file; either add a root-level dependency file
(e.g., requirements.txt or pyproject.toml) containing the repo's Python
dependencies (or create a small file that imports/includes
build/venv-test-ipywidgets8-requirements.txt or references
pythonFiles/pyproject.toml) so the actions/setup-python cache can detect and key
by it, or remove the cache: 'pip' line from the "Setup Python" step to disable
pip caching; update the workflow step accordingly and ensure the change
references the same step name ("Setup Python") in .github/workflows/ci.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant