Path: blob/main/build/azure-pipelines/linux/steps/product-build-linux-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- script: |16set -e17APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)18ELECTRON_ROOT=.build/electron19sudo chown root $APP_ROOT/chrome-sandbox20sudo chown root $ELECTRON_ROOT/chrome-sandbox21sudo chmod 4755 $APP_ROOT/chrome-sandbox22sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox23stat $APP_ROOT/chrome-sandbox24stat $ELECTRON_ROOT/chrome-sandbox25displayName: Change setuid helper binary permission2627- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:28- script: ./scripts/test.sh --build --tfs "Unit Tests"29displayName: �� Run unit tests (Electron)30timeoutInMinutes: 1531- script: npm run test-node -- --build32displayName: �� Run unit tests (node.js)33timeoutInMinutes: 153435- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:36- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"37env:38DEBUG: "*browser*"39displayName: �� Run unit tests (Browser, Chromium)40timeoutInMinutes: 154142- script: |43set -e44npm run gulp \45compile-extension:configuration-editing \46compile-extension:css-language-features-server \47compile-extension:emmet \48compile-extension:git \49compile-extension:github-authentication \50compile-extension:html-language-features-server \51compile-extension:ipynb \52compile-extension:notebook-renderers \53compile-extension:json-language-features-server \54compile-extension:markdown-language-features \55compile-extension-media \56compile-extension:microsoft-authentication \57compile-extension:typescript-language-features \58compile-extension:vscode-api-tests \59compile-extension:vscode-colorize-tests \60compile-extension:vscode-colorize-perf-tests \61compile-extension:vscode-test-resolver62displayName: Build integration tests6364- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:65- script: |66# Figure out the full absolute path of the product we just built67# including the remote server and configure the integration tests68# to run with these builds instead of running out of sources.69set -e70APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)71APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")72INTEGRATION_TEST_APP_NAME="$APP_NAME" \73INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \74./scripts/test-integration.sh --build --tfs "Integration Tests"75env:76VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)77displayName: 🧪 Run integration tests (Electron)78timeoutInMinutes: 207980- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:81- script: ./scripts/test-web-integration.sh --browser chromium82env:83VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web84displayName: �� Run integration tests (Browser, Chromium)85timeoutInMinutes: 208687- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:88- script: |89set -e90APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)91APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")92INTEGRATION_TEST_APP_NAME="$APP_NAME" \93INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \94./scripts/test-remote-integration.sh95env:96VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)97displayName: 🧪 Run integration tests (Remote)98timeoutInMinutes: 2099100- script: |101set -e102ps -ef103cat /proc/sys/fs/inotify/max_user_watches104lsof | wc -l105displayName: Diagnostics before smoke test run (processes, max_user_watches, number of opened file handles)106continueOnError: true107condition: succeededOrFailed()108109- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:110- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"111timeoutInMinutes: 20112displayName: �� Run smoke tests (Electron)113114- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:115- script: npm run smoketest-no-compile -- --web --tracing --headless116env:117VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web118timeoutInMinutes: 20119displayName: �� Run smoke tests (Browser, Chromium)120121- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:122- script: |123set -e124APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)125VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \126npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"127timeoutInMinutes: 20128displayName: 🧪 Run smoke tests (Remote)129130- script: |131set -e132ps -ef133cat /proc/sys/fs/inotify/max_user_watches134lsof | wc -l135displayName: Diagnostics after smoke test run (processes, max_user_watches, number of opened file handles)136continueOnError: true137condition: succeededOrFailed()138139- task: PublishTestResults@2140displayName: Publish Tests Results141inputs:142testResultsFiles: "*-results.xml"143searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"144condition: succeededOrFailed()145146147