forked from shihabmridha/nodejs-repository-pattern-and-ioc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
35 lines (28 loc) · 1.07 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
pool:
vmImage: "ubuntu-latest"
steps:
- task: NodeTool@0
inputs:
versionSpec: "12.x"
displayName: "Install Node.js"
- script: |
npm install -g [email protected]
npm install -g [email protected]
npm install
displayName: "Installing dependencies"
- script: tsc -p .
displayName: "Compiling typescript"
- script: NODE_ENV=$(NODE_ENV) LOG_LEVEL=debug DB_PWD=$(DB_PASSWORD) DB_USER=$(DB_USERNAME) DB_HOST=$(DB_HOST) DB_NAME=$(DB_NAME) jest --forceExit ./build/test/
displayName: "Running tests"
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: "**/test-report.xml"
- script: NODE_ENV=$(NODE_ENV) LOG_LEVEL=debug DB_PWD=$(DB_PASSWORD) DB_USER=$(DB_USERNAME) DB_HOST=$(DB_HOST) DB_NAME=$(DB_NAME) jest --coverage --forceExit ./build/test/
displayName: "Running test coverage"
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(Build.SourcesDirectory)/**/*coverage.xml"