forked from golevelup/nestjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
59 lines (51 loc) · 1.47 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
pr:
autoCancel: true
branches:
include:
- '*'
paths:
exclude:
- .gitignore
- ./*.md
- ./*.yml
- ./aws/*.ts
pool: node-docker
jobs:
- job: ci
continueOnError: false
displayName: 'Continuous Integration'
steps:
- 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'
- script: |
docker-compose -f docker-compose.ci.yml up -d
docker network connect golevelup-nestjs-network golevelup-nestjs-agent
yarn --cwd ./integration/rabbitmq
yarn test:ci:integration
displayName: Integration Testing
env:
NODE_ENV: ci
# failOnStderr: true
- script: |
docker network disconnect golevelup-nestjs-network golevelup-nestjs-agent
docker-compose -f docker-compose.ci.yml down
displayName: Cleanup
failOnStderr: false
condition: always()