mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Engineering - cleanup pull request ADO pipeline (#262276)
* Initial implementation * Fix indentation
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
parameters:
|
||||
- name: VSCODE_QUALITY
|
||||
type: string
|
||||
- name: VSCODE_RUN_ELECTRON_TESTS
|
||||
type: boolean
|
||||
- name: VSCODE_RUN_BROWSER_TESTS
|
||||
@@ -9,9 +7,6 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_TEST_ARTIFACT_NAME
|
||||
type: string
|
||||
- name: PUBLISH_TASK_NAME
|
||||
type: string
|
||||
default: PublishPipelineArtifact@0
|
||||
|
||||
steps:
|
||||
- script: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
@@ -20,52 +15,32 @@ steps:
|
||||
displayName: Download Electron and Playwright
|
||||
retryCountOnTaskFailure: 3
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
ELECTRON_ROOT=.build/electron
|
||||
sudo chown root $APP_ROOT/chrome-sandbox
|
||||
sudo chown root $ELECTRON_ROOT/chrome-sandbox
|
||||
sudo chmod 4755 $APP_ROOT/chrome-sandbox
|
||||
sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
|
||||
stat $APP_ROOT/chrome-sandbox
|
||||
stat $ELECTRON_ROOT/chrome-sandbox
|
||||
displayName: Change setuid helper binary permission
|
||||
- script: |
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
ELECTRON_ROOT=.build/electron
|
||||
sudo chown root $APP_ROOT/chrome-sandbox
|
||||
sudo chown root $ELECTRON_ROOT/chrome-sandbox
|
||||
sudo chmod 4755 $APP_ROOT/chrome-sandbox
|
||||
sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
|
||||
stat $APP_ROOT/chrome-sandbox
|
||||
stat $ELECTRON_ROOT/chrome-sandbox
|
||||
displayName: Change setuid helper binary permission
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: ./scripts/test.sh --tfs "Unit Tests"
|
||||
env:
|
||||
DISPLAY: ":10"
|
||||
displayName: 🧪 Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: npm run test-node
|
||||
displayName: 🧪 Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
displayName: 🧪 Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: npm run test-node -- --build
|
||||
displayName: 🧪 Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: npm run test-browser-no-install -- --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: 🧪 Run unit tests (Browser, Chromium)
|
||||
timeoutInMinutes: 15
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
displayName: 🧪 Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: npm run test-node -- --build
|
||||
displayName: 🧪 Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: 🧪 Run unit tests (Browser, Chromium)
|
||||
timeoutInMinutes: 15
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: 🧪 Run unit tests (Browser, Chromium)
|
||||
timeoutInMinutes: 15
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
@@ -89,60 +64,41 @@ steps:
|
||||
compile-extension:vscode-test-resolver
|
||||
displayName: Build integration tests
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
|
||||
env:
|
||||
DISPLAY: ":10"
|
||||
displayName: 🧪 Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
# to run with these builds instead of running out of sources.
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
displayName: 🧪 Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: ./scripts/test-web-integration.sh --browser chromium
|
||||
displayName: 🧪 Run integration tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: ./scripts/test-web-integration.sh --browser chromium
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
displayName: 🧪 Run integration tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
|
||||
- script: ./scripts/test-remote-integration.sh
|
||||
displayName: 🧪 Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
# to run with these builds instead of running out of sources.
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
displayName: 🧪 Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: ./scripts/test-web-integration.sh --browser chromium
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
displayName: 🧪 Run integration tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||
./scripts/test-remote-integration.sh
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
displayName: 🧪 Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||
./scripts/test-remote-integration.sh
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
displayName: 🧪 Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
@@ -153,51 +109,26 @@ steps:
|
||||
continueOnError: true
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: npm run compile
|
||||
workingDirectory: test/smoke
|
||||
displayName: Compile smoke tests
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Electron)
|
||||
|
||||
- script: npm run gulp node
|
||||
displayName: Download node.js for remote smoke tests
|
||||
retryCountOnTaskFailure: 3
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --web --tracing --headless
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Browser, Chromium)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --tracing
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Electron)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --web --tracing --headless
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Browser, Chromium)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --remote --tracing
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Remote)
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Electron)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
|
||||
- script: npm run smoketest-no-compile -- --web --tracing --headless
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Browser, Chromium)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
|
||||
npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Remote)
|
||||
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
|
||||
npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"
|
||||
timeoutInMinutes: 20
|
||||
displayName: 🧪 Run smoke tests (Remote)
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
@@ -208,7 +139,7 @@ steps:
|
||||
continueOnError: true
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: .build/crashes
|
||||
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
|
||||
@@ -222,7 +153,7 @@ steps:
|
||||
|
||||
# In order to properly symbolify above crash reports
|
||||
# (if any), we need the compiled native modules too
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: node_modules
|
||||
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
|
||||
@@ -234,7 +165,7 @@ steps:
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: .build/logs
|
||||
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
|
||||
|
||||
Reference in New Issue
Block a user