CoverageCheck Docker Plugin
summary: string Required, read unit test coverage-summary.json report from the specified filecheck_files: string Optional, read the list of files to be checked from the specified file, skip checking if emptylines: number Optional, minimum required Lines coverage, default is 0statements: number Optional, minimum required Statements coverage, default is 0functions: number Optional, minimum required Functions coverage, default is 0branches: number Optional, minimum required Branches coverage, default is 0Using on Cloud Native Build
# .cnb.yml
main:
pull_request:
- stages:
- name: run unit test
script: npm run test
- name: git-change-list
image: cnbcool/git-change-list:latest
settings:
changed: changed.txt
- name: do check coverage
image: tencentcom/coverage-check:latest
settings:
summary: ./coverage/coverage-summary.json
check_files: changed.txt
lines: 80
statements: 80
functions: 80
branches: 80
final: ./coverage/coverage-final.json