Path: blob/main/build/azure-pipelines/darwin/steps/product-build-darwin-test.yml
4774 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"17displayName: �� Run unit tests (Electron)18timeoutInMinutes: 1519- script: npm run test-node -- --build20displayName: �� Run unit tests (node.js)21timeoutInMinutes: 152223- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:24- script: npm run test-browser-no-install -- --build --browser webkit --tfs "Browser Unit Tests"25env:26DEBUG: "*browser*"27displayName: �� Run unit tests (Browser, Webkit)28timeoutInMinutes: 302930- script: |31set -e32npm run gulp \33compile-extension:configuration-editing \34compile-extension:css-language-features-server \35compile-extension:emmet \36compile-extension:git \37compile-extension:github-authentication \38compile-extension:html-language-features-server \39compile-extension:ipynb \40compile-extension:notebook-renderers \41compile-extension:json-language-features-server \42compile-extension:markdown-language-features \43compile-extension-media \44compile-extension:microsoft-authentication \45compile-extension:typescript-language-features \46compile-extension:vscode-api-tests \47compile-extension:vscode-colorize-tests \48compile-extension:vscode-colorize-perf-tests \49compile-extension:vscode-test-resolver50displayName: Build integration tests5152- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:53- script: |54# Figure out the full absolute path of the product we just built55# including the remote server and configure the integration tests56# to run with these builds instead of running out of sources.57set -e58APP_ROOT="$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)"59APP_NAME="`ls $APP_ROOT | head -n 1`"60INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \61./scripts/test-integration.sh --build --tfs "Integration Tests"62env:63VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)64displayName: 🧪 Run integration tests (Electron)65timeoutInMinutes: 206667- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:68- script: ./scripts/test-web-integration.sh --browser webkit69env:70VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web71displayName: �� Run integration tests (Browser, Webkit)72timeoutInMinutes: 207374- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:75- script: |76set -e77APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)78APP_NAME="`ls $APP_ROOT | head -n 1`"79INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \80./scripts/test-remote-integration.sh81env:82VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)83displayName: 🧪 Run integration tests (Remote)84timeoutInMinutes: 208586- script: ps -ef87displayName: Diagnostics before smoke test run88continueOnError: true89condition: succeededOrFailed()9091- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:92- script: |93set -e94APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)95APP_NAME="`ls $APP_ROOT | head -n 1`"96npm run smoketest-no-compile -- --tracing --build "$APP_ROOT/$APP_NAME"97timeoutInMinutes: 2098displayName: 🧪 Run smoke tests (Electron)99100- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:101- script: npm run smoketest-no-compile -- --web --tracing --headless102env:103VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web104timeoutInMinutes: 20105displayName: �� Run smoke tests (Browser, Chromium)106107- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:108- script: |109set -e110npm run gulp compile-extension:vscode-test-resolver111APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)112APP_NAME="`ls $APP_ROOT | head -n 1`"113npm run smoketest-no-compile -- --tracing --remote --build "$APP_ROOT/$APP_NAME"114env:115VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)116timeoutInMinutes: 20117displayName: 🧪 Run smoke tests (Remote)118119- script: ps -ef120displayName: Diagnostics after smoke test run121continueOnError: true122condition: succeededOrFailed()123124- task: PublishTestResults@2125displayName: Publish Tests Results126inputs:127testResultsFiles: "*-results.xml"128searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"129condition: succeededOrFailed()130131132