fix(testing): codecov reports (#2094)
* fix(testing): fix codecov.yml * fix(testing): make code coverage procedure for main and PRs identical * fix(testing): make codecov ignore the right folders
This commit is contained in:
parent
cfbe0b48ac
commit
87bdcb4127
@ -55,7 +55,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
gcovr --root .. --object-dir . --exclude-directories xmpsdk --exclude-directories unitTests --exclude-directories samples --exclude '.*xmpsdk.*' --exclude '.*unitTests.*' --exclude '.*samples.*' --exclude-unreachable-branches --exclude-throw-branches --xml -o coverage.xml
|
# this needs to match th ecommand in on_push_ExtraJobsForMain.yml!
|
||||||
|
gcovr --root .. --object-dir . --exclude-unreachable-branches --exclude-throw-branches --xml -o coverage.xml
|
||||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
|
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
|
||||||
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
||||||
|
|||||||
@ -18,6 +18,7 @@ jobs:
|
|||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install conan==1.45.0
|
pip3 install conan==1.45.0
|
||||||
|
pip install gcovr
|
||||||
|
|
||||||
- name: Conan common config
|
- name: Conan common config
|
||||||
run: |
|
run: |
|
||||||
@ -52,8 +53,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
pip install gcovr
|
# this needs to match th ecommand in on_PR_linux_secial_builds.yml!
|
||||||
gcovr -r ./../ -x --exclude-unreachable-branches --exclude-throw-branches -o coverage.xml .
|
gcovr --root .. --object-dir . --exclude-unreachable-branches --exclude-throw-branches --xml -o coverage.xml .
|
||||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
|
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
|
||||||
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
||||||
|
|||||||
23
codecov.yml
23
codecov.yml
@ -1,8 +1,25 @@
|
|||||||
codecov:
|
coverage:
|
||||||
branch: main
|
|
||||||
precision: 2
|
precision: 2
|
||||||
|
round: down
|
||||||
range: "60..100"
|
range: "60..100"
|
||||||
|
|
||||||
|
# we don't care about the coverage of files in these folders
|
||||||
ignore:
|
ignore:
|
||||||
- "xmpsdk" # Not interested about the coverage of XMKSDK
|
- "xmpsdk"
|
||||||
- "unitTests"
|
- "unitTests"
|
||||||
- "samples"
|
- "samples"
|
||||||
|
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
threshold: 1 # decrease by up to 1% doesn't result in failure
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
# check only the diff of the PR
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
threshold: 1
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
only_pulls: true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user