This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
/
azure-pipelines.yml
122 lines (92 loc) · 2.94 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
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema
trigger:
- master
pr:
autoCancel: true
branches:
include:
- master
jobs:
- job: linux_build
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js 10.x'
- bash: npm --version
displayName: 'npm --version'
- bash: npm ci
displayName: 'npm ci'
# - task: CacheBeta@0
# inputs:
# key: $(Build.SourcesDirectory)/package-lock.json
# path: $(npm_config_cache)
# displayName: Cache npm
- bash: npm test
displayName: 'npm test'
- bash: npm run cibuild
displayName: 'npm run cibuild'
- job: linux_test
dependsOn: linux_build
condition: false
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js 10.x'
- bash: npm --version
displayName: 'npm --version'
- bash: npm ci
displayName: 'npm ci'
# Randomly pick 1 out of 5 LUIS Authoring Keys and set the BASH_ENV with it.
# - run: node .circleci/SetLuisAuthoringKey.js >> $BASH_ENV
- bash: git clone https://github.com/Microsoft/ConversationLearner-Samples -b develop ../cl-samples
displayName: 'Clone the Samples BOT'
- bash: npm ci
workingDirectory: ../cl-samples
displayName: 'Samples - npm ci'
- bash: npm run build
workingDirectory: ../cl-samples
displayName: 'Samples - npm run build'
- bash: npm run test-apicallbacks &
workingDirectory: ../cl-samples
displayName: 'Samples - npm start'
- bash: npm start &
displayName: 'UI - npm start'
# - bash: npx wait-on -- http://localhost:3978
- bash: npx wait-on -- http://localhost:3000
displayName: 'npx wait-on -- http://localhost:3000'
- bash: npm run cypress -- run --record false --spec "cypress/integration/Regression/**/*.spec.js"
displayName: 'Run Cypress Regression Tests'
- bash: npm run cypress -- run --record false --spec "cypress/integration/regressionTs/**/*.spec.*"
displayName: 'Run Cypress Typescript Regression Tests'
condition: always()
- bash: npm run cypress -- run --record false --spec "cypress/integration/Tools/DeleteAllTestGeneratedModels.spec.js"
displayName: 'Run Cypress Delete Models'
condition: always()
- job: windows_build
pool:
vmImage: 'windows-2019'
steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
inputs:
debugMode: false
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: 'Post Analysis'
inputs:
CredScan: true
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js 10.x'
- script: npm ci
displayName: 'npm ci'
- script: npm run cibuild
displayName: 'npm run cibuild'
- script: npm test
displayName: 'npm test'