Path: blob/main/build/azure-pipelines/copilot/test-integration-steps.yml
13383 views
parameters:1- name: OS2type: string # linux, darwin, win3234steps:5# Setup copilot test environment (tokens, env vars)6- task: AzureCLI@27inputs:8azureSubscription: 'VS Code Development WIF'9${{ if eq(parameters.OS, 'win32') }}:10scriptType: 'pscore'11${{ else }}:12scriptType: 'bash'13scriptLocation: 'inlineScript'14inlineScript: npm run setup15workingDirectory: $(Build.SourcesDirectory)/extensions/copilot16displayName: Setup copilot test environment1718# Compute the path to the VS Code build executable19- ${{ if eq(parameters.OS, 'linux') }}:20- script: |21set -e22APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)23APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")24echo "##vso[task.setvariable variable=VSCODE_UNDER_TEST]$APP_ROOT/$APP_NAME"25displayName: Compute VS Code build path2627- ${{ if eq(parameters.OS, 'darwin') }}:28- script: |29set -e30APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)31APP_NAME="$(ls $APP_ROOT | head -n 1)"32ProductJsonPath=$(find "$APP_ROOT" -name "product.json" -type f | head -n 1)33BINARY_NAME=$(jq -r '.nameShort' "$ProductJsonPath")34echo "##vso[task.setvariable variable=VSCODE_UNDER_TEST]$APP_ROOT/$APP_NAME/Contents/MacOS/$BINARY_NAME"35displayName: Compute VS Code build path3637- ${{ if eq(parameters.OS, 'win32') }}:38- powershell: |39$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"40$ProductJsonPath = (Get-ChildItem -Path "$AppRoot" -Name "product.json" -Recurse | Select-Object -First 1)41$AppProductJson = Get-Content -Raw -Path "$AppRoot\$ProductJsonPath" | ConvertFrom-Json42$AppNameShort = $AppProductJson.nameShort43Write-Host "##vso[task.setvariable variable=VSCODE_UNDER_TEST]$AppRoot\$AppNameShort.exe"44displayName: Compute VS Code build path4546# Compile copilot extension for tests47- script: npm run compile48workingDirectory: $(Build.SourcesDirectory)/extensions/copilot49displayName: Compile copilot5051# Run Copilot integration tests52- ${{ if eq(parameters.OS, 'linux') }}:53- script: xvfb-run -a npm run test:extension54workingDirectory: $(Build.SourcesDirectory)/extensions/copilot55displayName: �� Run Copilot extension tests56timeoutInMinutes: 1557env:58VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)5960- script: xvfb-run -a npm run test:completions-core61workingDirectory: $(Build.SourcesDirectory)/extensions/copilot62displayName: �� Run Copilot completions core tests63timeoutInMinutes: 1564env:65VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)6667- script: xvfb-run -a npm run test:sanity68workingDirectory: $(Build.SourcesDirectory)/extensions/copilot69displayName: �� Run Copilot sanity tests70timeoutInMinutes: 1571env:72VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)7374- ${{ if eq(parameters.OS, 'darwin') }}:75- script: npm run test:extension76workingDirectory: $(Build.SourcesDirectory)/extensions/copilot77displayName: �� Run Copilot extension tests78timeoutInMinutes: 1579env:80VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)8182- script: npm run test:completions-core83workingDirectory: $(Build.SourcesDirectory)/extensions/copilot84displayName: �� Run Copilot completions core tests85timeoutInMinutes: 1586env:87VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)8889- script: npm run test:sanity90workingDirectory: $(Build.SourcesDirectory)/extensions/copilot91displayName: �� Run Copilot sanity tests92timeoutInMinutes: 1593env:94VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)9596- ${{ if eq(parameters.OS, 'win32') }}:97- powershell: npm run test:extension98workingDirectory: $(Build.SourcesDirectory)/extensions/copilot99displayName: �� Run Copilot extension tests100timeoutInMinutes: 15101env:102VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)103104# MAYBE https://dev.azure.com/monacotools/Monaco/_build/results?buildId=426316&view=logs&j=573fdb8c-432d-57b7-addd-e5c3edb6227f&t=6fad2a73-ceba-567d-939f-7bd557eba1dc&s=40b405d8-d9ea-5f38-8ab3-8db0b216e2d0105- powershell: npm run test:completions-core106workingDirectory: $(Build.SourcesDirectory)/extensions/copilot107displayName: �� Run Copilot completions core tests108timeoutInMinutes: 15109env:110VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)111112- powershell: npm run test:sanity113workingDirectory: $(Build.SourcesDirectory)/extensions/copilot114displayName: �� Run Copilot sanity tests115timeoutInMinutes: 15116env:117VSCODE_UNDER_TEST: $(VSCODE_UNDER_TEST)118119120