-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines-ui-tests.yml
252 lines (243 loc) · 8.82 KB
/
azure-pipelines-ui-tests.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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
variables:
SPN_NAME: s101d-datahub-spn-ees-dfe-gov-uk
schedules:
- cron: 0 6 * * 1,2,3,4,5
branches:
include:
- dev
always: true
pr: none
name: $(date:yyyyMMdd)$(rev:.r)
resources:
repositories:
- repository: self
type: git
ref: refs/heads/dev
jobs:
- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: Public
displayName: Public suite - Robot UI tests
testFolder: tests/general_public
artifactName: test-results-public
- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: PublishAndAmend
displayName: Publish release and amend suites - Robot UI tests
testFolder: tests/admin_and_public_2
artifactName: test-results-admin-and-public-2
- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: Admin
displayName: Admin suites - Robot UI tests
testFolder: tests/admin
artifactName: test-results-admin
- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: AdminAndPublic
displayName: Admin & public suites - Robot UI tests
testFolder: tests/admin_and_public
artifactName: test-results-admin-public
- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: PublicAPI
displayName: Public API suite - Robot UI tests
testFolder: tests/public_api
artifactName: test-results-admin-public-api
#- job: PublicPlaywrightUItest
# displayName: Public suite - Playwright UI tests
# timeoutInMinutes: 160
# cancelTimeoutInMinutes: 10
# condition: succeededOrFailed()
# pool: ees-ubuntu2204-large
# workspace:
# clean: all
# steps:
# - checkout: self
# clean: true
# fetchDepth: 5
# fetchTags: false
#
# - task: NodeTool@0
# displayName: Use Node 18
# timeoutInMinutes: 5
# inputs:
# versionSpec: '18.18.2'
#
# - script: |
# node -v
# displayName: Display node version
#
# - script: |
# npm ci
# displayName: Clean and install NPM dependencies
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
#
# - script: |
# npx playwright install --with-deps
# displayName: Install Playwright browsers
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
#
# - script: |
# npx playwright test --project "public"
# displayName: Run Playwright tests
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
# env:
# CI: 'true'
# PUBLIC_URL: $(PUBLIC_URL)
# PROD_PUBLIC_URL: $(PROD_PUBLIC_URL)
# PUBLIC_USERNAME: $(PUBLIC_AUTH_USER)
# PUBLIC_PASSWORD: $(PUBLIC_AUTH_PASSWORD)
# ADMIN_URL: $(ADMIN_URL)
# ADMIN_EMAIL: $(ADMIN_EMAIL)
#
# # this publishes the html report as an artifact that can then be downloaded
# - task: PublishTestResults@2
# displayName: Public Suite - Publish Playwright Test Results
# inputs:
# testResultsFiles: tests/playwright-tests/test-results/playwright-results.xml
# failTaskOnFailedTests: true
#
# - task: PublishPipelineArtifact@1
# displayName: Public Suite - Publish Playwright Test Artifacts
# condition: succeededOrFailed()
# inputs:
# path: tests/playwright-tests/test-results/
# artifactName: test-results-playwright-public
#
#
#- job: AdminPlaywrightUITest
# displayName: Admin suite - Playwright UI tests
# timeoutInMinutes: 160
# cancelTimeoutInMinutes: 10
# condition: succeededOrFailed()
# pool: ees-ubuntu2204-large
# workspace:
# clean: all
# steps:
# - checkout: self
# clean: true
# fetchDepth: 5
# fetchTags: false
#
# - task: NodeTool@0
# displayName: Use Node 18
# timeoutInMinutes: 5
# inputs:
# versionSpec: '18.18.2'
#
# - task: AzureKeyVault@2
# displayName: Azure Key Vault - s101d01-kv-ees-01
# inputs:
# azureSubscription: $(SPN_NAME)
# KeyVaultName: s101d01-kv-ees-01
# SecretsFilter: ees-test-ADMIN-PASSWORD
# RunAsPreJob: true
#
# - script: |
# node -v
# displayName: Display node version
#
# - script: |
# npm ci
# displayName: 'Clean and install npm dependencies'
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
#
# - script: |
# npx playwright install --with-deps
# displayName: 'Install Playwright browsers'
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
#
# - script: |
# npx playwright test --project "admin"
# displayName: "Run Playwright tests"
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
# env:
# CI: 'true'
# ADMIN_URL: $(ADMIN_URL)
# ADMIN_EMAIL: $(ADMIN_EMAIL)
# ADMIN_PASSWORD: $(ees-test-ADMIN-PASSWORD)
#
# # this publishes the html report as an artifact that can then be downloaded
# - task: PublishTestResults@2
# displayName: Admin Suite - Publish Playwright Test Results
# inputs:
# testResultsFiles: tests/playwright-tests/test-results/playwright-results.xml
# failTaskOnFailedTests: true
#
# - task: PublishPipelineArtifact@1
# displayName: Admin Suite - Publish Pipeline Artifact
# condition: succeededOrFailed()
# inputs:
# path: tests/playwright-tests/test-results/
# artifactName: test-results-playwright-admin
#
#- job: AdminAndPublicPlaywrightUItest
# displayName: Admin and public suite - Playwright UI tests
# timeoutInMinutes: 160
# cancelTimeoutInMinutes: 10
# condition: succeededOrFailed()
# pool: ees-ubuntu2204-large
# workspace:
# clean: all
# steps:
# - checkout: self
# clean: true
# fetchDepth: 5
# fetchTags: false
#
# - task: NodeTool@0
# displayName: Use Node 18
# timeoutInMinutes: 5
# inputs:
# versionSpec: '18.18.2'
#
# - task: AzureKeyVault@2
# displayName: Azure Key Vault - s101d01-kv-ees-01
# inputs:
# azureSubscription: $(SPN_NAME)
# KeyVaultName: s101d01-kv-ees-01
# SecretsFilter: ees-test-ADMIN-PASSWORD
# RunAsPreJob: true
#
# - script: |
# node -v
# displayName: Display node version
#
# - script: |
# npm ci
# displayName: Clean and install npm dependencies
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
#
# - script: |
# npx playwright install --with-deps
# displayName: Install Playwright browsers
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
#
# - script: |
# npx playwright test --project "adminandpublic"
#
# displayName: Run Playwright tests
# workingDirectory: $(System.DefaultWorkingDirectory)/tests/playwright-tests/
# env:
# CI: 'true'
# PUBLIC_URL: $(PUBLIC_URL)
# PUBLIC_USERNAME: $(PUBLIC_AUTH_USER)
# PUBLIC_PASSWORD: $(PUBLIC_AUTH_PASSWORD)
# ADMIN_URL: $(ADMIN_URL)
# ADMIN_EMAIL: $(ADMIN_EMAIL)
# ADMIN_PASSWORD: $(ees-test-ADMIN-PASSWORD)
#
# # this publishes the html report as an artifact that can then be downloaded
# - task: PublishTestResults@2
# displayName: Admin And Public Suite - Publish Playwright Test Results
# inputs:
# testResultsFiles: tests/playwright-tests/test-results/playwright-results.xml
# failTaskOnFailedTests: true
#
# - task: PublishPipelineArtifact@1
# displayName: Admin And Public Suite - Publish Playwright Test Artifacts
# condition: succeededOrFailed()
# inputs:
# path: tests/playwright-tests/test-results/
# artifactName: test-results-playwright-tests-admin-and-public