Path: blob/main/build/azure-pipelines/win32/steps/product-build-win32-test.yml
4774 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-all2 -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$ProductJsonPath = (Get-ChildItem -Path "$AppRoot" -Name "product.json" -Recurse | Select-Object -First 1)79$AppProductJson = Get-Content -Raw -Path "$AppRoot\$ProductJsonPath" | ConvertFrom-Json80$AppNameShort = $AppProductJson.nameShort81$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"82$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"83exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }84displayName: 🧪 Run integration tests (Electron)85timeoutInMinutes: 208687- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:88- powershell: |89. build/azure-pipelines/win32/exec.ps190$ErrorActionPreference = "Stop"91$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web"92exec { .\scripts\test-web-integration.bat --browser firefox }93displayName: 🧪 Run integration tests (Browser, Firefox)94timeoutInMinutes: 209596- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:97- powershell: |98. build/azure-pipelines/win32/exec.ps199$ErrorActionPreference = "Stop"100$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"101$ProductJsonPath = (Get-ChildItem -Path "$AppRoot" -Name "product.json" -Recurse | Select-Object -First 1)102$AppProductJson = Get-Content -Raw -Path "$AppRoot\$ProductJsonPath" | ConvertFrom-Json103$AppNameShort = $AppProductJson.nameShort104$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"105$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"106exec { .\scripts\test-remote-integration.bat }107displayName: 🧪 Run integration tests (Remote)108timeoutInMinutes: 20109110- powershell: .\build\azure-pipelines\win32\listprocesses.bat111displayName: Diagnostics after integration test runs112continueOnError: true113condition: succeededOrFailed()114115- powershell: .\build\azure-pipelines\win32\listprocesses.bat116displayName: Diagnostics before smoke test run117continueOnError: true118condition: succeededOrFailed()119120- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:121- powershell: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"122displayName: �� Run smoke tests (Electron)123timeoutInMinutes: 20124125- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:126- powershell: npm run smoketest-no-compile -- --web --tracing --headless127env:128VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web129displayName: �� Run smoke tests (Browser, Chromium)130timeoutInMinutes: 20131132- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:133- powershell: npm run smoketest-no-compile -- --tracing --remote --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"134env:135VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)136displayName: �� Run smoke tests (Remote)137timeoutInMinutes: 20138139- powershell: .\build\azure-pipelines\win32\listprocesses.bat140displayName: Diagnostics after smoke test run141continueOnError: true142condition: succeededOrFailed()143144- task: PublishTestResults@2145displayName: Publish Tests Results146inputs:147testResultsFiles: "*-results.xml"148searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"149condition: succeededOrFailed()150151152