Welcome to mirror list, hosted at ThFree Co, Russian Federation.

product-build-win32-test.yml « win32 « azure-pipelines « build - github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9dc50f8bcc47b5b31951d53daf264fc8692e0998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
parameters:
  - name: VSCODE_RUN_UNIT_TESTS
    type: boolean
  - name: VSCODE_RUN_INTEGRATION_TESTS
    type: boolean
  - name: VSCODE_RUN_SMOKE_TESTS
    type: boolean

steps:
  - powershell: |
      . build/azure-pipelines/win32/exec.ps1
      $ErrorActionPreference = "Stop"
      $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
      exec { yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install" }
    displayName: Download Electron and Playwright

  - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        exec { yarn electron $(VSCODE_ARCH) }
        exec { .\scripts\test.bat --build --tfs "Unit Tests" }
      displayName: Run unit tests (Electron)
      timeoutInMinutes: 15

  - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        exec { yarn test-node --build }
      displayName: Run unit tests (node.js)
      timeoutInMinutes: 15

  - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        exec { yarn test-browser-no-install --sequential --build --browser chromium --browser firefox --tfs "Browser Unit Tests" }
      displayName: Run unit tests (Browser, Chromium & Firefox)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        exec { yarn gulp `
          compile-extension:configuration-editing `
          compile-extension:css-language-features-server `
          compile-extension:emmet `
          compile-extension:git `
          compile-extension:github-authentication `
          compile-extension:html-language-features-server `
          compile-extension:ipynb `
          compile-extension:json-language-features-server `
          compile-extension:markdown-language-features-server `
          compile-extension:markdown-language-features `
          compile-extension-media `
          compile-extension:microsoft-authentication `
          compile-extension:typescript-language-features `
          compile-extension:vscode-api-tests `
          compile-extension:vscode-colorize-tests `
          compile-extension:vscode-notebook-tests `
          compile-extension:vscode-test-resolver `
        }
      displayName: Build integration tests

  - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
    - powershell: |
        # 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.
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
        $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
        $AppNameShort = $AppProductJson.nameShort
        exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-integration.bat --build --tfs "Integration Tests" }
      displayName: Run integration tests (Electron)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\scripts\test-web-integration.bat --browser firefox }
      displayName: Run integration tests (Browser, Firefox)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
        $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
        $AppNameShort = $AppProductJson.nameShort
        exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-remote-integration.bat }
      displayName: Run integration tests (Remote)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        exec {.\build\azure-pipelines\win32\listprocesses.bat }
      displayName: Diagnostics before smoke test run
      continueOnError: true
      condition: succeededOrFailed()

  - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"
        exec { yarn smoketest-no-compile --web --tracing --headless }
      displayName: Run smoke tests (Browser, Chromium)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
        exec { yarn smoketest-no-compile --tracing --build "$AppRoot" }
      displayName: Run smoke tests (Electron)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        $ErrorActionPreference = "Stop"
        $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
        $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
        exec { yarn gulp compile-extension:vscode-test-resolver }
        exec { yarn smoketest-no-compile --tracing --remote --build "$AppRoot" }
      displayName: Run smoke tests (Remote)
      timeoutInMinutes: 20

  - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
    - powershell: |
        . build/azure-pipelines/win32/exec.ps1
        exec {.\build\azure-pipelines\win32\listprocesses.bat }
      displayName: Diagnostics after smoke test run
      continueOnError: true
      condition: succeededOrFailed()

  - ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
    - task: PublishPipelineArtifact@0
      inputs:
        targetPath: .build\crashes
        ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
          artifactName: crash-dump-windows-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
        ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
          artifactName: crash-dump-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
        ${{ else }}:
          artifactName: crash-dump-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
      displayName: "Publish Crash Reports"
      continueOnError: true
      condition: failed()

  - ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
    # In order to properly symbolify above crash reports
    # (if any), we need the compiled native modules too
    - task: PublishPipelineArtifact@0
      inputs:
        targetPath: node_modules
        ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
          artifactName: node-modules-windows-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
        ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
          artifactName: node-modules-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
        ${{ else }}:
          artifactName: node-modules-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
      displayName: "Publish Node Modules"
      continueOnError: true
      condition: failed()

  - ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
    - task: PublishPipelineArtifact@0
      inputs:
        targetPath: .build\logs
        ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
          artifactName: logs-windows-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
        ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
          artifactName: logs-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
        ${{ else }}:
          artifactName: logs-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
      displayName: "Publish Log Files"
      continueOnError: true
      condition: succeededOrFailed()

  - task: PublishTestResults@2
    displayName: Publish Tests Results
    inputs:
      testResultsFiles: "*-results.xml"
      searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
    condition: succeededOrFailed()