Add ut coverage report for every PR

Signed-off-by: sshijun <sshijun@vmware.com>
This commit is contained in:
sshijun 2020-01-19 18:07:09 +08:00 committed by xhxh
parent 63ef743ba7
commit 89148b457a
2 changed files with 42 additions and 4 deletions

25
.github/codecov-ut-config/codecov.yml vendored Normal file
View File

@ -0,0 +1,25 @@
codecov:
require_ci_to_pass: no
coverage:
precision: 2
round: down
range: "50...100"
status:
project: yes
patch: yes
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no

View File

@ -14,6 +14,7 @@ env:
REDIS_HOST: localhost
REG_VERSION: v2.7.1-patch-2819-2553
UI_BUILDER_VERSION: 1.6.0
CODECOV_TOKEN: 89c7b95b-dbce-431e-8cb3-55691a9dcc64 #codecov token: visit https://github.com/codecov/codecov-action to learn more
on:
pull_request:
@ -75,6 +76,12 @@ jobs:
run: |
echo IP: $IP
bash ./tests/showtime.sh ./tests/travis/ut_run.sh $IP
- name: Codecov For BackEnd
uses: codecov/codecov-action@v1
with:
token: ${CODECOV_TOKEN}
file: ./profile.cov
yml: ./.github/codecov-ut-config/codecov.yml
APITEST_DB:
env:
@ -277,3 +284,9 @@ jobs:
run: |
echo IP: $IP
bash ./tests/showtime.sh ./tests/travis/ui_ut_run.sh
- name: Codecov For UI
uses: codecov/codecov-action@v1.0.5
with:
token: ${CODECOV_TOKEN}
file: ./src/portal/coverage/lcov.info
yml: ./.github/codecov-ut-config/codecov.yml