Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
21 changes: 21 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Apply this file to CodeQL default setup with the repository property:
# github-codeql-config-file: ./.github/codeql/codeql-config.yml
paths-ignore:
# Keep directory exclusions scoped: product code imports helpers from some
# extension src/test directories.
- 'test/**'
- 'src/**/test/**'
- 'build/**/test/**'
- 'cli/tests/**'
- '.eslint-plugin-local/tests/**'
- 'extensions/*/test/**'
- 'extensions/*/tests/**'
# Keep exact suffixes: themes.test.contribution.ts ships in the product.
- '**/*.test.js'
- '**/*.test.jsx'
- '**/*.test.mjs'
- '**/*.test.cjs'
- '**/*.test.ts'
- '**/*.test.tsx'
- '**/*.test.mts'
- '**/*.test.cts'
22 changes: 13 additions & 9 deletions .github/workflows/pr-darwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ on:
remote_tests:
type: boolean
default: false
unit_and_integration_tests:
unit_tests:
type: boolean
default: true
integration_tests:
type: boolean
default: true
smoke_tests:
Expand All @@ -25,7 +28,7 @@ jobs:
name: ${{ inputs.job_name }}
runs-on: macos-26-xlarge
env:
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}${{ (!inputs.unit_and_integration_tests && inputs.smoke_tests) && '-smoke' || '' }}
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}${{ (inputs.unit_tests && !inputs.integration_tests && '-unit') || (!inputs.unit_tests && !inputs.integration_tests && inputs.smoke_tests && '-smoke') || '' }}
NPM_ARCH: arm64
VSCODE_ARCH: arm64
steps:
Expand All @@ -35,7 +38,7 @@ jobs:
lfs: true

- name: Detect Agent Host E2E changes
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.integration_tests }}
id: agent-host-e2e-changes
uses: ./.github/actions/detect-agent-host-e2e-changes
with:
Expand Down Expand Up @@ -126,25 +129,26 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 🧪 Run unit tests (Electron)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.unit_tests }}
timeout-minutes: 15
run: ./scripts/test.sh --tfs "Unit Tests"
env:
VSCODE_SKIP_PRELAUNCH: '1'

- name: 🧪 Run unit tests (node.js)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.unit_tests }}
timeout-minutes: 15
run: npm run test-node

- name: 🧪 Run unit tests (Browser, Webkit)
if: ${{ inputs.browser_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.browser_tests && inputs.unit_tests }}
timeout-minutes: 30
run: npm run test-browser-no-install -- --browser webkit --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"

- name: Compile extensions for integration tests & smoke tests
if: ${{ inputs.integration_tests || inputs.smoke_tests }}
run: |
set -e
npm run gulp \
Expand All @@ -167,20 +171,20 @@ jobs:
compile-extension:vscode-test-resolver

- name: 🧪 Run integration tests (Electron)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.integration_tests }}
timeout-minutes: 20
run: ./scripts/test-integration.sh --tfs "Integration Tests"
env:
VSCODE_SKIP_AGENT_HOST_E2E: ${{ steps.agent-host-e2e-changes.outputs.affected == 'false' && '1' || '0' }}
VSCODE_SKIP_PRELAUNCH: '1'

- name: 🧪 Run integration tests (Browser, Webkit)
if: ${{ inputs.browser_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.browser_tests && inputs.integration_tests }}
timeout-minutes: 20
run: ./scripts/test-web-integration.sh --browser webkit

- name: 🧪 Run integration tests (Remote)
if: ${{ inputs.remote_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.remote_tests && inputs.integration_tests }}
timeout-minutes: 20
run: ./scripts/test-remote-integration.sh
env:
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/pr-linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ on:
remote_tests:
type: boolean
default: false
unit_and_integration_tests:
unit_tests:
type: boolean
default: true
integration_tests:
type: boolean
default: true
smoke_tests:
Expand All @@ -25,7 +28,7 @@ jobs:
name: ${{ inputs.job_name }}
runs-on: ubuntu-24.04
env:
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}${{ (!inputs.unit_and_integration_tests && inputs.smoke_tests) && '-smoke' || '' }}
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}${{ (inputs.unit_tests && !inputs.integration_tests && '-unit') || (!inputs.unit_tests && !inputs.integration_tests && inputs.smoke_tests && '-smoke') || '' }}
NPM_ARCH: x64
VSCODE_ARCH: x64
steps:
Expand All @@ -35,7 +38,7 @@ jobs:
lfs: true

- name: Detect Agent Host E2E changes
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.integration_tests }}
id: agent-host-e2e-changes
uses: ./.github/actions/detect-agent-host-e2e-changes
with:
Expand Down Expand Up @@ -326,26 +329,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 🧪 Run unit tests (Electron)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.unit_tests }}
timeout-minutes: 15
run: ./scripts/test.sh --tfs "Unit Tests"
env:
DISPLAY: ":10"
VSCODE_SKIP_PRELAUNCH: '1'

- name: 🧪 Run unit tests (node.js)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.unit_tests }}
timeout-minutes: 15
run: npm run test-node

- name: 🧪 Run unit tests (Browser, Chromium)
if: ${{ inputs.browser_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.browser_tests && inputs.unit_tests }}
timeout-minutes: 30
run: npm run test-browser-no-install -- --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"

- name: Compile extensions for integration tests & smoke tests
if: ${{ inputs.integration_tests || inputs.smoke_tests }}
run: |
set -e
npm run gulp \
Expand All @@ -368,7 +372,7 @@ jobs:
compile-extension:vscode-test-resolver

- name: 🧪 Run integration tests (Electron)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.integration_tests }}
timeout-minutes: 20
run: ./scripts/test-integration.sh --tfs "Integration Tests"
env:
Expand All @@ -377,12 +381,12 @@ jobs:
VSCODE_SKIP_PRELAUNCH: '1'

- name: 🧪 Run integration tests (Browser, Chromium)
if: ${{ inputs.browser_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.browser_tests && inputs.integration_tests }}
timeout-minutes: 20
run: ./scripts/test-web-integration.sh --browser chromium

- name: 🧪 Run integration tests (Remote)
if: ${{ inputs.remote_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.remote_tests && inputs.integration_tests }}
timeout-minutes: 20
run: ./scripts/test-remote-integration.sh
env:
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/pr-win32-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ on:
remote_tests:
type: boolean
default: false
unit_and_integration_tests:
unit_tests:
type: boolean
default: true
integration_tests:
type: boolean
default: true
smoke_tests:
Expand All @@ -25,7 +28,7 @@ jobs:
name: ${{ inputs.job_name }}
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-windows-2022-x64, "JobId=windows-test-${{ inputs.job_name }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
env:
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}${{ (!inputs.unit_and_integration_tests && inputs.smoke_tests) && '-smoke' || '' }}
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}${{ (inputs.unit_tests && !inputs.integration_tests && '-unit') || (!inputs.unit_tests && !inputs.integration_tests && inputs.smoke_tests && '-smoke') || '' }}
NPM_ARCH: x64
VSCODE_ARCH: x64
steps:
Expand All @@ -35,7 +38,7 @@ jobs:
lfs: true

- name: Detect Agent Host E2E changes
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.integration_tests }}
id: agent-host-e2e-changes
uses: ./.github/actions/detect-agent-host-e2e-changes
with:
Expand Down Expand Up @@ -136,28 +139,29 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 🧪 Run unit tests (Electron)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.unit_tests }}
timeout-minutes: 15
shell: pwsh
run: .\scripts\test.bat --tfs "Unit Tests"
env:
VSCODE_SKIP_PRELAUNCH: '1'

- name: 🧪 Run unit tests (node.js)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.unit_tests }}
timeout-minutes: 15
shell: pwsh
run: npm run test-node

- name: 🧪 Run unit tests (Browser, Chromium)
if: ${{ inputs.browser_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.browser_tests && inputs.unit_tests }}
timeout-minutes: 20
shell: pwsh
run: node test/unit/browser/index.js --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"

- name: Compile extensions for integration tests & smoke tests
if: ${{ inputs.integration_tests || inputs.smoke_tests }}
shell: pwsh
run: |
. build/azure-pipelines/win32/exec.ps1
Expand All @@ -183,13 +187,13 @@ jobs:
}

- name: Diagnostics before integration test runs
if: ${{ inputs.unit_and_integration_tests && always() }}
if: ${{ inputs.integration_tests && always() }}
shell: pwsh
run: .\build\azure-pipelines\win32\listprocesses.bat
continue-on-error: true

- name: 🧪 Run integration tests (Electron)
if: ${{ inputs.electron_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.electron_tests && inputs.integration_tests }}
timeout-minutes: 20
shell: pwsh
run: .\scripts\test-integration.bat --tfs "Integration Tests"
Expand All @@ -198,21 +202,21 @@ jobs:
VSCODE_SKIP_PRELAUNCH: '1'

- name: 🧪 Run integration tests (Browser, Chromium)
if: ${{ inputs.browser_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.browser_tests && inputs.integration_tests }}
timeout-minutes: 20
shell: pwsh
run: .\scripts\test-web-integration.bat --browser chromium

- name: 🧪 Run integration tests (Remote)
if: ${{ inputs.remote_tests && inputs.unit_and_integration_tests }}
if: ${{ inputs.remote_tests && inputs.integration_tests }}
timeout-minutes: 20
shell: pwsh
run: .\scripts\test-remote-integration.bat
env:
VSCODE_SKIP_PRELAUNCH: '1'

- name: Diagnostics after integration test runs
if: ${{ inputs.unit_and_integration_tests && always() }}
if: ${{ inputs.integration_tests && always() }}
shell: pwsh
run: .\build\azure-pipelines\win32\listprocesses.bat
continue-on-error: true
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,22 @@ jobs:
job_name: CLI
rustup_toolchain: 1.88

linux-electron-unit-tests:
name: Linux
uses: ./.github/workflows/pr-linux-test.yml
with:
job_name: Electron-Unit
electron_tests: true
integration_tests: false
smoke_tests: false

linux-electron-tests:
name: Linux
uses: ./.github/workflows/pr-linux-test.yml
with:
job_name: Electron
electron_tests: true
unit_tests: false
smoke_tests: false

linux-electron-smoke-tests:
Expand All @@ -127,7 +137,8 @@ jobs:
with:
job_name: Electron-Smoke
electron_tests: true
unit_and_integration_tests: false
unit_tests: false
integration_tests: false

linux-browser-tests:
name: Linux
Expand All @@ -143,12 +154,22 @@ jobs:
job_name: Remote
remote_tests: true

macos-electron-unit-tests:
name: macOS
uses: ./.github/workflows/pr-darwin-test.yml
with:
job_name: Electron-Unit
electron_tests: true
integration_tests: false
smoke_tests: false

macos-electron-tests:
name: macOS
uses: ./.github/workflows/pr-darwin-test.yml
with:
job_name: Electron
electron_tests: true
unit_tests: false
smoke_tests: false

macos-electron-smoke-tests:
Expand All @@ -157,7 +178,8 @@ jobs:
with:
job_name: Electron-Smoke
electron_tests: true
unit_and_integration_tests: false
unit_tests: false
integration_tests: false

macos-browser-tests:
name: macOS
Expand All @@ -173,12 +195,22 @@ jobs:
job_name: Remote
remote_tests: true

windows-electron-unit-tests:
name: Windows
uses: ./.github/workflows/pr-win32-test.yml
with:
job_name: Electron-Unit
electron_tests: true
integration_tests: false
smoke_tests: false

windows-electron-tests:
name: Windows
uses: ./.github/workflows/pr-win32-test.yml
with:
job_name: Electron
electron_tests: true
unit_tests: false
smoke_tests: false

windows-electron-smoke-tests:
Expand All @@ -187,7 +219,8 @@ jobs:
with:
job_name: Electron-Smoke
electron_tests: true
unit_and_integration_tests: false
unit_tests: false
integration_tests: false

windows-browser-tests:
name: Windows
Expand Down
Loading
Loading