forked from microsoft/BotFramework-Composer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
100 lines (97 loc) · 3.14 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
jobs:
- job: botproject
displayName: BotProject
pool:
vmImage: ubuntu-16.04
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'BotProject/CSharp/BotProject.csproj'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'BotProject/CSharp/Tests/Tests.csproj'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: 'BotProject/CSharp/Tests/Tests.csproj'
- job: test
displayName: Composer
pool:
vmImage: ubuntu-16.04
steps:
- task: NodeTool@0
displayName: 'Use Node 10.15.3'
inputs:
versionSpec: 10.15.3
- script: cd Composer && yarn install
displayName: 'yarn install'
- script: cd Composer && yarn build:prod
displayName: 'yarn build:prod'
env:
NODE_OPTIONS: --max-old-space-size=2048
- script: cd Composer && yarn lint
displayName: 'yarn lint'
- script: cd Composer && yarn test:coverage
displayName: 'yarn test:coverage'
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from Composer/coverage/cobertura-coverage.xml'
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: 'Composer/coverage/cobertura-coverage.xml'
reportDirectory: 'Composer/coverage/lcov-report'
- task: PublishTestResults@2
displayName: Publish Unit Test Results
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/junit.xml'
testRunTitle: Unit Tests
mergeTestResults: true
- job: e2e
displayName: E2E Tests
pool:
vmImage: ubuntu-16.04
steps:
- task: NodeTool@0
displayName: 'Use Node 10.15.3'
inputs:
versionSpec: 10.15.3
- script: cd Composer && yarn install
displayName: 'yarn install'
- script: cd Composer && yarn build:prod
displayName: 'yarn build:prod'
env:
NODE_OPTIONS: --max-old-space-size=2048
- script: cd Composer && yarn test:integration
displayName: yarn test:integration
env:
CYPRESS_screenshotsFolder: $(Build.ArtifactStagingDirectory)/cypress/screenshots
CYPRESS_COMPOSER_URL: http://localhost:5000
continueOnError: true
- task: PublishBuildArtifacts@1
condition: in(variables['Agent.JobStatus'], 'SucceededWithIssues', 'Failed')
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/cypress'
artifactName: cypress
- task: PublishTestResults@2
displayName: Publish E2E Test Results
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/cypress/results/results-*.xml'
testRunTitle: E2E Tests
mergeTestResults: true
- job: security
displayName: Security Analysis
steps:
- task: ComponentGovernanceComponentDetection@0