Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/darwin/steps/product-build-darwin-test.yml
4774 views
1
parameters:
2
- name: VSCODE_RUN_ELECTRON_TESTS
3
type: boolean
4
- name: VSCODE_RUN_BROWSER_TESTS
5
type: boolean
6
- name: VSCODE_RUN_REMOTE_TESTS
7
type: boolean
8
9
steps:
10
- script: npm exec -- npm-run-all2 -lp "electron $(VSCODE_ARCH)" "playwright-install"
11
env:
12
GITHUB_TOKEN: "$(github-distro-mixin-password)"
13
displayName: Download Electron and Playwright
14
retryCountOnTaskFailure: 3
15
16
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
17
- script: ./scripts/test.sh --build --tfs "Unit Tests"
18
displayName: Run unit tests (Electron)
19
timeoutInMinutes: 15
20
- script: npm run test-node -- --build
21
displayName: Run unit tests (node.js)
22
timeoutInMinutes: 15
23
24
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
25
- script: npm run test-browser-no-install -- --build --browser webkit --tfs "Browser Unit Tests"
26
env:
27
DEBUG: "*browser*"
28
displayName: Run unit tests (Browser, Webkit)
29
timeoutInMinutes: 30
30
31
- script: |
32
set -e
33
npm run gulp \
34
compile-extension:configuration-editing \
35
compile-extension:css-language-features-server \
36
compile-extension:emmet \
37
compile-extension:git \
38
compile-extension:github-authentication \
39
compile-extension:html-language-features-server \
40
compile-extension:ipynb \
41
compile-extension:notebook-renderers \
42
compile-extension:json-language-features-server \
43
compile-extension:markdown-language-features \
44
compile-extension-media \
45
compile-extension:microsoft-authentication \
46
compile-extension:typescript-language-features \
47
compile-extension:vscode-api-tests \
48
compile-extension:vscode-colorize-tests \
49
compile-extension:vscode-colorize-perf-tests \
50
compile-extension:vscode-test-resolver
51
displayName: Build integration tests
52
53
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
54
- script: |
55
# Figure out the full absolute path of the product we just built
56
# including the remote server and configure the integration tests
57
# to run with these builds instead of running out of sources.
58
set -e
59
APP_ROOT="$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)"
60
APP_NAME="`ls $APP_ROOT | head -n 1`"
61
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
62
./scripts/test-integration.sh --build --tfs "Integration Tests"
63
env:
64
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
65
displayName: 🧪 Run integration tests (Electron)
66
timeoutInMinutes: 20
67
68
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
69
- script: ./scripts/test-web-integration.sh --browser webkit
70
env:
71
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
72
displayName: Run integration tests (Browser, Webkit)
73
timeoutInMinutes: 20
74
75
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
76
- script: |
77
set -e
78
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
79
APP_NAME="`ls $APP_ROOT | head -n 1`"
80
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
81
./scripts/test-remote-integration.sh
82
env:
83
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
84
displayName: 🧪 Run integration tests (Remote)
85
timeoutInMinutes: 20
86
87
- script: ps -ef
88
displayName: Diagnostics before smoke test run
89
continueOnError: true
90
condition: succeededOrFailed()
91
92
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
93
- script: |
94
set -e
95
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
96
APP_NAME="`ls $APP_ROOT | head -n 1`"
97
npm run smoketest-no-compile -- --tracing --build "$APP_ROOT/$APP_NAME"
98
timeoutInMinutes: 20
99
displayName: 🧪 Run smoke tests (Electron)
100
101
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
102
- script: npm run smoketest-no-compile -- --web --tracing --headless
103
env:
104
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
105
timeoutInMinutes: 20
106
displayName: Run smoke tests (Browser, Chromium)
107
108
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
109
- script: |
110
set -e
111
npm run gulp compile-extension:vscode-test-resolver
112
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
113
APP_NAME="`ls $APP_ROOT | head -n 1`"
114
npm run smoketest-no-compile -- --tracing --remote --build "$APP_ROOT/$APP_NAME"
115
env:
116
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
117
timeoutInMinutes: 20
118
displayName: 🧪 Run smoke tests (Remote)
119
120
- script: ps -ef
121
displayName: Diagnostics after smoke test run
122
continueOnError: true
123
condition: succeededOrFailed()
124
125
- task: PublishTestResults@2
126
displayName: Publish Tests Results
127
inputs:
128
testResultsFiles: "*-results.xml"
129
searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
130
condition: succeededOrFailed()
131
132