Path: blob/main/build/azure-pipelines/win32/product-build-win32-test.yml
3520 views
parameters:1- name: VSCODE_ARCH2type: string3- name: VSCODE_RUN_ELECTRON_TESTS4type: boolean5- name: VSCODE_RUN_BROWSER_TESTS6type: boolean7- name: VSCODE_RUN_REMOTE_TESTS8type: boolean910steps:11- powershell: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"12env:13GITHUB_TOKEN: "$(github-distro-mixin-password)"14displayName: Download Electron and Playwright15retryCountOnTaskFailure: 31617- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:18- powershell: .\scripts\test.bat --build --tfs "Unit Tests"19displayName: �� Run unit tests (Electron)20timeoutInMinutes: 1521- powershell: npm run test-node -- --build22displayName: �� Run unit tests (node.js)23timeoutInMinutes: 152425- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:26- powershell: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"27displayName: �� Run unit tests (Browser, Chromium)28timeoutInMinutes: 202930- powershell: |31. build/azure-pipelines/win32/exec.ps132$ErrorActionPreference = "Stop"33exec { npm run gulp `34compile-extension:configuration-editing `35compile-extension:css-language-features-server `36compile-extension:emmet `37compile-extension:git `38compile-extension:github-authentication `39compile-extension:html-language-features-server `40compile-extension:ipynb `41compile-extension:notebook-renderers `42compile-extension:json-language-features-server `43compile-extension:markdown-language-features `44compile-extension-media `45compile-extension:microsoft-authentication `46compile-extension:typescript-language-features `47compile-extension:vscode-api-tests `48compile-extension:vscode-colorize-tests `49compile-extension:vscode-colorize-perf-tests `50compile-extension:vscode-test-resolver `51}52displayName: Build integration tests5354- powershell: .\build\azure-pipelines\win32\listprocesses.bat55displayName: Diagnostics before integration test runs56continueOnError: true57condition: succeededOrFailed()5859- powershell: |60# Copy client, server and web builds to a separate test directory, to avoid Access Denied errors in codesign61. build/azure-pipelines/win32/exec.ps162$ErrorActionPreference = "Stop"63$TestDir = "$(agent.builddirectory)\test"64New-Item -ItemType Directory -Path $TestDir -Force65Copy-Item -Path "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)" -Destination "$TestDir\VSCode-win32-$(VSCODE_ARCH)" -Recurse -Force66Copy-Item -Path "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)" -Destination "$TestDir\vscode-server-win32-$(VSCODE_ARCH)" -Recurse -Force67Copy-Item -Path "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)-web" -Destination "$TestDir\vscode-server-win32-$(VSCODE_ARCH)-web" -Recurse -Force68displayName: Copy builds to test directory6970- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:71- powershell: |72# Figure out the full absolute path of the product we just built73# including the remote server and configure the integration tests74# to run with these builds instead of running out of sources.75. build/azure-pipelines/win32/exec.ps176$ErrorActionPreference = "Stop"77$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"78$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json79$AppNameShort = $AppProductJson.nameShort80$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"81$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"82exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }83displayName: 🧪 Run integration tests (Electron)84timeoutInMinutes: 208586- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:87- powershell: |88. build/azure-pipelines/win32/exec.ps189$ErrorActionPreference = "Stop"90$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web"91exec { .\scripts\test-web-integration.bat --browser firefox }92displayName: 🧪 Run integration tests (Browser, Firefox)93timeoutInMinutes: 209495- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:96- powershell: |97. build/azure-pipelines/win32/exec.ps198$ErrorActionPreference = "Stop"99$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"100$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json101$AppNameShort = $AppProductJson.nameShort102$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"103$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"104exec { .\scripts\test-remote-integration.bat }105displayName: 🧪 Run integration tests (Remote)106timeoutInMinutes: 20107108- powershell: .\build\azure-pipelines\win32\listprocesses.bat109displayName: Diagnostics after integration test runs110continueOnError: true111condition: succeededOrFailed()112113- powershell: .\build\azure-pipelines\win32\listprocesses.bat114displayName: Diagnostics before smoke test run115continueOnError: true116condition: succeededOrFailed()117118- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:119- powershell: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"120displayName: �� Run smoke tests (Electron)121timeoutInMinutes: 20122123- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:124- powershell: npm run smoketest-no-compile -- --web --tracing --headless125env:126VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web127displayName: �� Run smoke tests (Browser, Chromium)128timeoutInMinutes: 20129130- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:131- powershell: npm run smoketest-no-compile -- --tracing --remote --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"132env:133VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)134displayName: �� Run smoke tests (Remote)135timeoutInMinutes: 20136137- powershell: .\build\azure-pipelines\win32\listprocesses.bat138displayName: Diagnostics after smoke test run139continueOnError: true140condition: succeededOrFailed()141142- task: PublishTestResults@2143displayName: Publish Tests Results144inputs:145testResultsFiles: "*-results.xml"146searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"147condition: succeededOrFailed()148149150