forked from vid/gccollab-e2e-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
102 lines (86 loc) · 2.63 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
resources:
pipelines:
- pipeline: post-pr-e2e-tests
project: gccollab-IaC-resources
source: gctools-outilsgc.gcconnex - PR
trigger: true
jobs:
- job: e2etests
pool:
vmImage: 'ubuntu-latest'
# container:
# image: mcr.microsoft.com/playwright:v1.40.1-jammy
# volumes: [e2e-reviews]
steps:
# - checkout: e2etest
- task: Npm@1
inputs:
command: 'install'
displayName: 'installing dependencies'
- task: CmdLine@2
displayName: 'playwright deps'
inputs:
script: |
npx playwright install
# - task: CmdLine@2
# displayName: 'install playwright deps'
# inputs:
# script: |
# npx playwright install --with-deps
- task: CmdLine@2
displayName: 'make junit test directory'
continueOnError: false
inputs:
script: |
mkdir junit
# using CmdLine for the following instead of Npm because npm buffers the entire output
- task: CmdLine@2
displayName: 'Running path e2e tests'
continueOnError: true
inputs:
script: |
npm run test-pr-happy
- task: CmdLine@2
displayName: 'Running a11y e2e tests'
continueOnError: true
inputs:
script: |
npm run test-pr-a11y
- task: CmdLine@2
displayName: 'Running regression e2e tests'
continueOnError: true
inputs:
script: |
npm run test-pr-regressions
- task: CmdLine@2
displayName: 'Publish test result history'
continueOnError: true
inputs:
script: |
npm run publish-history-azure
- task: CmdLine@2
displayName: 'Publish dashboard'
continueOnError: true
inputs:
script: |
pwd
ls -la
npm run publish-reviewer-azure
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'junit/**.xml'
# - job: publish_e2e_artifacts
# dependsOn: e2etests
# steps:
# - publish: '$(System.DefaultWorkingDirectory)'
# artifact: e2e_capture
# displayName: Publish e2e artifact
# - job: exit_if_failed
# dependsOn: publish_e2e_artifacts
# condition: eq(dependencies.e2etests.result,'Succeeded')
# steps:
# - script: echo e2e tests passed, continuing.
# - job: publish_junit_results
# dependsOn: e2etests
# steps: