Skip to content

Instantly share code, notes, and snippets.

@dzeyelid
Created December 15, 2019 10:41
Show Gist options
  • Save dzeyelid/e19dea2da86240127af13d86f6a92743 to your computer and use it in GitHub Desktop.
Save dzeyelid/e19dea2da86240127af13d86f6a92743 to your computer and use it in GitHub Desktop.
azure-pipelines.yml sample for "Check! Code Coverage with Jest on Azure DevOps"
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run coverage
displayName: 'npm install and output coverage'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml
@vineetrawat
Copy link

Have you ever written a script that will block a PR if coverage numbers falls below certain percentage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment