Path: blob/main/build/azure-pipelines/darwin/steps/product-build-darwin-test.yml
5390 views
parameters:1- name: VSCODE_RUN_ELECTRON_TESTS2type: boolean3- name: VSCODE_RUN_BROWSER_TESTS4type: boolean5- name: VSCODE_RUN_REMOTE_TESTS6type: boolean78steps:9- script: npm exec -- npm-run-all2 -lp "electron $(VSCODE_ARCH)" "playwright-install"10env:11GITHUB_TOKEN: "$(github-distro-mixin-password)"12displayName: Download Electron and Playwright13retryCountOnTaskFailure: 31415- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:16- script: ./scripts/test.sh --build --tfs "Unit Tests"17env:18VSCODE_SKIP_PRELAUNCH: '1'19displayName: �� Run unit tests (Electron)20timeoutInMinutes: 1521- script: npm run test-node -- --build22displayName: �� Run unit tests (node.js)23timeoutInMinutes: 152425- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:26- script: npm run test-browser-no-install -- --build --browser webkit --tfs "Browser Unit Tests"27env:28DEBUG: "*browser*"29displayName: �� Run unit tests (Browser, Webkit)30timeoutInMinutes: 303132- script: |33set -e34npm run gulp \35compile-extension:configuration-editing \36compile-extension:css-language-features-server \37compile-extension:emmet \38compile-extension:git \39compile-extension:github-authentication \40compile-extension:html-language-features-server \41compile-extension:ipynb \42compile-extension:notebook-renderers \43compile-extension:json-language-features-server \44compile-extension:markdown-language-features \45compile-extension-media \46compile-extension:microsoft-authentication \47compile-extension:typescript-language-features \48compile-extension:vscode-api-tests \49compile-extension:vscode-colorize-tests \50compile-extension:vscode-colorize-perf-tests \51compile-extension:vscode-test-resolver52displayName: Build integration tests5354- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:55- script: |56# Figure out the full absolute path of the product we just built57# including the remote server and configure the integration tests58# to run with these builds instead of running out of sources.59set -e60APP_ROOT="$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)"61APP_NAME="`ls $APP_ROOT | head -n 1`"62ProductJsonPath=$(find "$APP_ROOT" -name "product.json" -type f | head -n 1)63BINARY_NAME=$(jq -r '.nameShort' "$ProductJsonPath")64INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/$BINARY_NAME" \65./scripts/test-integration.sh --build --tfs "Integration Tests"66env:67VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)68VSCODE_SKIP_PRELAUNCH: '1'69displayName: 🧪 Run integration tests (Electron)70timeoutInMinutes: 207172- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:73- script: ./scripts/test-web-integration.sh --browser webkit74env:75VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web76displayName: �� Run integration tests (Browser, Webkit)77timeoutInMinutes: 207879- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:80- script: |81set -e82APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)83APP_NAME="`ls $APP_ROOT | head -n 1`"84ProductJsonPath=$(find "$APP_ROOT" -name "product.json" -type f | head -n 1)85BINARY_NAME=$(jq -r '.nameShort' "$ProductJsonPath")86INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/$BINARY_NAME" \87./scripts/test-remote-integration.sh88env:89VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)90VSCODE_SKIP_PRELAUNCH: '1'91displayName: 🧪 Run integration tests (Remote)92timeoutInMinutes: 209394- script: ps -ef95displayName: Diagnostics before smoke test run96continueOnError: true97condition: succeededOrFailed()9899- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:100- script: |101set -e102APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)103APP_NAME="`ls $APP_ROOT | head -n 1`"104npm run smoketest-no-compile -- --tracing --build "$APP_ROOT/$APP_NAME"105timeoutInMinutes: 20106displayName: 🧪 Run smoke tests (Electron)107108- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:109- script: npm run smoketest-no-compile -- --web --tracing --headless110env:111VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web112timeoutInMinutes: 20113displayName: �� Run smoke tests (Browser, Chromium)114115- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:116- script: |117set -e118npm run gulp compile-extension:vscode-test-resolver119APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)120APP_NAME="`ls $APP_ROOT | head -n 1`"121npm run smoketest-no-compile -- --tracing --remote --build "$APP_ROOT/$APP_NAME"122env:123VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)124timeoutInMinutes: 20125displayName: 🧪 Run smoke tests (Remote)126127- script: ps -ef128displayName: Diagnostics after smoke test run129continueOnError: true130condition: succeededOrFailed()131132- task: PublishTestResults@2133displayName: Publish Tests Results134inputs:135testResultsFiles: "*-results.xml"136searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"137condition: succeededOrFailed()138139140