mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Add ut coverage report for every PR
Signed-off-by: sshijun <sshijun@vmware.com>
This commit is contained in:
parent
63ef743ba7
commit
89148b457a
25
.github/codecov-ut-config/codecov.yml
vendored
Normal file
25
.github/codecov-ut-config/codecov.yml
vendored
Normal 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
|
13
.github/workflows/CI.yml
vendored
13
.github/workflows/CI.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user