-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
76 lines (60 loc) · 1.92 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
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
jobs:
- job: Cypress_e2e_tests
pool:
vmImage: ubuntu-latest
variables:
- group: Firebase
steps:
- task: NodeTool@0
inputs:
versionSpec: '20.x'
displayName: 'Install Node.js'
- task: CacheBeta@1
inputs:
key: npm | $(Agent.OS) | package-lock.json
path: /home/vsts/.npm
restoreKeys: npm | $(Agent.OS) | package-lock.json
displayName: Cache NPM packages
- task: CacheBeta@1
inputs:
key: cypress | $(Agent.OS) | package-lock.json
path: /home/vsts/.cache/Cypress
restoreKeys: cypress | $(Agent.OS) | package-lock.json
displayName: Cache Cypress binary
- script: npm ci
displayName: 'Install npm dependencies'
- script: npm run cy:verify
displayName: 'Cypress verify'
- script: npm run cy:info
displayName: 'Cypress Info'
- script: npm run build
displayName: 'Build'
- script: |
npx print-env AGENT
npx print-env BUILD
npx print-env SYSTEM
npm run preview & wait-on http://localhost:5173
TESTOMATIO=tstmt_oqUX_FJhgMysv2eOyNw8EDaWe8BesC-hcQ1724494587 npx cypress run --record --parallel --ci-build-id $BUILD_BUILDNUMBER --group "Azure CI"
displayName: 'Run Cypress Tests'
env:
CYPRESS_RECORD_KEY: $(CYPRESS_RECORD_KEY)
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: 'test-results-*.xml'
searchFolder: 'results'
mergeTestResults: true
failTaskOnFailedTests: true
continueOnError: true
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'dist'
ArtifactName: 'drop'
publishLocation: 'Container'