-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yml
52 lines (42 loc) · 1.05 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
# This is a demo pipeline
# The `CI` variable is used by playwright.config.ts to configure retry and reporting behaviour
variables:
- name: CI
value: true
pr:
- main
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- script: |
npm install -g @angular/cli
npm install
ng build
displayName: 'npm install and build'
- script: |
npx playwright install
npx playwright install-deps
displayName: 'Install playwright'
- script: |
npx playwright test
displayName: 'Run UI tests'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: 'JUnit'
testResultsFiles: 'uiTestResults.xml'
testRunTitle: UI test results
displayName: 'Publish UI test results'
- task: PublishPipelineArtifact@1
condition: failed()
inputs:
targetPath: '$(System.DefaultWorkingDirectory)/test-results'
artifact: 'Test attachments'
publishLocation: 'pipeline'
displayName: 'If failed then publish UI test attachments'