-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathazure-pipelines.yml
30 lines (24 loc) · 1002 Bytes
/
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
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: 'Install Node.js'
- script: |
npm install
displayName: 'Installing dependencies'
- script: NODE_ENV=$(NODE_ENV) DATABASE_PASSWORD=$(DB_PASSWORD) DATABASE_USER=$(DB_USERNAME) DATABASE_HOST=$(DB_HOST) DATABASE_NAME=$(DB_NAME) MONGO_PROTOCOL=mongodb+srv npm run test
displayName: 'Running tests'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '**/test-report.xml'
- script: NODE_ENV=$(NODE_ENV) DATABASE_PASSWORD=$(DB_PASSWORD) DATABASE_USER=$(DB_USERNAME) DATABASE_HOST=$(DB_HOST) DATABASE_NAME=$(DB_NAME) MONGO_PROTOCOL=mongodb+srv npm run test:cov
displayName: 'Running test coverage'
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/**/*coverage.xml'