Merge pull request #10536 from AllForNothing/master

Add ut coverage report
This commit is contained in:
Ziming 2020-02-03 13:40:53 +08:00 committed by GitHub
commit 0f1c4b644c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,8 +14,9 @@ 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:
on:
pull_request:
push:
@ -23,7 +24,7 @@ jobs:
UTTEST:
env:
UTTEST: true
runs-on:
runs-on:
#- self-hosted
- ubuntu-latest
steps:
@ -75,7 +76,13 @@ 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:
APITEST_DB: true
@ -129,7 +136,7 @@ jobs:
run: |
echo IP: $IP
bash ./tests/showtime.sh ./tests/travis/api_run.sh DB $IP
APITEST_LDAP:
env:
APITEST_LDAP: true
@ -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