forked from golevelup/nestjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.managed.yml
64 lines (55 loc) · 1.5 KB
/
azure-pipelines.managed.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:
autoCancel: true
branches:
include:
- '*'
paths:
exclude:
- .gitignore
- ./*.md
- ./*.yml
- ./aws/*.ts
trigger: none
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
jobs:
- job: ci
continueOnError: false
displayName: 'Continuous Integration'
steps:
- task: Cache@2
inputs:
key: 'yarn | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
yarn | "$(Agent.OS)"
yarn
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages
- script: |
yarn build:ci
displayName: 'Install Dependencies and Build'
- script: |
yarn test:ci
displayName: 'Unit Test'
- task: PublishTestResults@2
condition: always()
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'junit.xml'
- task: PublishCodeCoverageResults@1
condition: always()
displayName: 'Publish Code Coverage'
inputs:
codeCoverageTool: cobertura
summaryFileLocation: 'coverage/cobertura-coverage.xml'
reportDirectory: './coverage'
- task: DockerCompose@0
displayName: Docker Compose Up
inputs:
dockerComposeFile: docker-compose.yml
dockerComposeCommand: up -d
- script: |
yarn --cwd ./integration/rabbitmq
yarn test:integration --force-exit
displayName: Integration Tests