forked from OfficeDev/microsoft-teams-library-js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
158 lines (138 loc) · 5.11 KB
/
azure-pipelines.yml
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
variables:
- group: InfoSec-SecurityResults
trigger:
branches:
include:
- 'main'
- 'release/*'
jobs:
- job: Security
displayName: 'Security Tasks'
pool:
vmImage: 'windows-latest'
steps:
- template: tools/yaml-templates/security.yml
- job: Build
displayName: 'Build Test Publish'
pool:
vmImage: 'windows-latest'
steps:
- template: tools/yaml-templates/build-test-publish.yml
- job: E2ETest1
displayName: 'E2E Test - Perf'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: tools/yaml-templates/build-app-host.yml
parameters:
appHostGitPath: git://$(AppHostingSdkGitPath)@$(AppHostingSdkGitRef)
- bash: 'node tools/cli/runAppsWithE2ETests.js --appUrl=https://localhost:4002 --reportFileName=e2e-tests-report-perf --envType=perf'
displayName: 'Run E2E Perf tests'
condition: succeeded()
workingDirectory: '$(AppHostingSdkProjectDirectory)'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/e2e-tests-report*.xml'
testRunTitle: 'E2E Tests - Perf'
mergeTestResults: true
condition: succeededOrFailed()
- job: E2ETest2
displayName: 'E2E Test - Default'
pool:
vmImage: 'ubuntu-20.04'
steps:
- template: tools/yaml-templates/build-app-host.yml
parameters:
appHostGitPath: git://$(AppHostingSdkGitPath2)@$(AppHostingSdkGitRef)
- bash: 'node tools/cli/runAppsWithE2ETests.js'
displayName: 'Run E2E integration tests'
condition: succeeded()
workingDirectory: '$(AppHostingSdkProjectDirectory)'
- task: CMDLine@2
displayName: 'Run tests for electron webview'
inputs:
script: |
pnpm exec xvfb-maybe playwright test
workingDirectory: '$(AppHostingSdkProjectDirectory)'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/e2e-tests-report*.xml'
testRunTitle: 'E2E Tests - Default'
mergeTestResults: true
condition: succeededOrFailed()
- job: E2ETest3
displayName: 'E2E Test - Local Tag'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: tools/yaml-templates/build-app-host.yml
parameters:
appHostGitPath: git://$(AppHostingSdkGitPath3)@$(AppHostingSdkGitRef)
- task: CmdLine@2
displayName: 'Build Test App Local'
inputs:
script: |
pnpm build-test-app-local
workingDirectory: '$(ClientSdkProjectDirectory)'
- bash: 'node tools/cli/runAppsWithE2ETests.js --reportFileName=e2e-tests-report-local-script-tag --envType=localScriptTag'
displayName: 'Run E2E integration tests with local script tag'
condition: succeeded()
workingDirectory: '$(AppHostingSdkProjectDirectory)'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/e2e-tests-report*.xml'
testRunTitle: 'E2E Tests - Local Tag'
mergeTestResults: true
condition: succeededOrFailed()
- job: E2ETestCDN
displayName: 'E2E Test - CDN (only runs on release builds)'
# This test only runs after deployment from a release branch and the new CDN version has been deployed
# This check will run on the PR to merge the release branch back into main
condition: and(
eq(variables['Build.Reason'], 'PullRequest'),
startsWith(variables['System.PullRequest.SourceBranch'], 'release/'),
eq(variables['System.PullRequest.TargetBranch'], 'main')
)
pool:
vmImage: 'ubuntu-latest'
steps:
- template: tools/yaml-templates/build-app-host.yml
parameters:
appHostGitPath: git://$(AppHostingSdkGitPath6)@$(AppHostingSdkGitRef)
- task: CmdLine@2
displayName: 'Build Test App CDN'
inputs:
script: |
pnpm build-test-app-CDN
workingDirectory: '$(ClientSdkProjectDirectory)'
- bash: 'node tools/cli/runAppsWithE2ETests.js --reportFileName=e2e-tests-report-cdn-script-tag --envType=cdnScriptTag'
displayName: 'Run E2E integration tests with local script tag on latest cdn bundles'
condition: succeeded()
workingDirectory: '$(AppHostingSdkProjectDirectory)'
enabled: true
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/e2e-tests-report*.xml'
testRunTitle: 'E2E Tests - CDN'
mergeTestResults: true
condition: succeededOrFailed()
- job: E2ETestAndroid
displayName: 'E2E Test - Android'
pool:
vmImage: 'internal-macos-11'
steps:
- template: tools/yaml-templates/android-test.yml
parameters:
androidAppHostingSdkGitPath: git://$(AndroidAppHostingSdkGitPath)
- job: E2ETestIOS
displayName: 'E2E Test - IOS'
pool:
vmImage: 'internal-macos12'
steps:
- template: tools/yaml-templates/ios-test.yml
parameters:
iOSAppHostingSdkGitPath: git://$(IOSAppHostingSdkGitPath)