forked from microsoft/BotFramework-WebChat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
64 lines (53 loc) · 1.58 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
# pr:
# branches:
# include:
# - main
variables:
CI: '1'
NODE_ENV: 'test'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: Use Node 12.x
inputs:
versionSpec: 12.x
- task: DockerInstaller@0
displayName: Install Docker 17.09.0-ce
- script: |
npm ci
npm run bootstrap
npm run eslint
npm run build
docker-compose up --build --detach
npm run test -- --ci --coverage true --maxWorkers=4 --no-watch
- script: |
docker-compose down --rmi all
condition: always()
- task: PublishTestResults@2
displayName: Publish Test Results coverage/junit.xml
inputs:
testResultsFiles: coverage/junit.xml
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
displayName: Publish code coverage from coverage/cobertura-coverage.xml
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage/cobertura-coverage.xml
condition: succeededOrFailed()
- task: ArchiveFiles@2
displayName: Zip test image snapshots
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/__tests__/__image_snapshots__/
archiveFile: $(Build.ArtifactStagingDirectory)/image-snapshots/image-snapshots.zip
condition: succeededOrFailed()
- task: cURLUploader@2
displayName: Upload test image snapshots for viewing
inputs:
files: $(Build.ArtifactStagingDirectory)/image-snapshots/image-snapshots.zip
authType: UserAndPass
url: https://webchat-curator.azurewebsites.net/upload
redirectStderr: false
condition: succeededOrFailed()
- publish: $(Build.SourcesDirectory)/packages/bundle/dist
artifact: bundle