Skip to content

Commit

Permalink
Merge pull request #55 from btl5037/master
Browse files Browse the repository at this point in the history
[BE-709] Add code coverage report to AZP
  • Loading branch information
nekia authored Nov 21, 2019
2 parents 27f06a2 + 6367cee commit 8b027b7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"extension": [
".js"
],
"reporter": "cobertura",
"lines": 80,
"functions": 80,
"statements": 80,
Expand Down
13 changes: 13 additions & 0 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ jobs:
echo "--------> npm tests with code coverage"
npm run test:ci -- -u --coverage && npm run build
displayName: Run Tests With Coverage Report
- script: |
cd client
wget https://raw.github.com/eriwen/lcov-to-cobertura-xml/master/lcov_cobertura/lcov_cobertura.py
python lcov_cobertura.py ./coverage/lcov.info
mv $(System.DefaultWorkingDirectory)/app/test/*.js $(System.DefaultWorkingDirectory)/client
displayName: Create Cobertura Report
- script: npx cobertura-merge -o output.xml package1=$(System.DefaultWorkingDirectory)/app/test/coverage/cobertura-coverage.xml package2=$(System.DefaultWorkingDirectory)/client/coverage.xml
displayName: Merge Cobertura Reports
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: $(System.DefaultWorkingDirectory)/output.xml
pathToSources: $(System.DefaultWorkingDirectory)/client

- job: SanityChecks
pool:
Expand Down

0 comments on commit 8b027b7

Please sign in to comment.