Skip to content

Commit

Permalink
Use coveragerc for files ignore
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Bainian <[email protected]>
  • Loading branch information
Briancbn committed Jun 16, 2020
1 parent fef52c3 commit 3f5153e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions industrial_ci/src/tests/source_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ function ici_combine_python_reports {
# Combine coverage files
python3 -m coverage combine
# Generate report
python3 -m coverage report --omit=*/test/*,*/setup.py,*/__init__.py
python3 -m coverage xml --omit=*/test/*,*/setup.py,*/__init__.py
printf "[report]\nomit = \n\t*/test/*\n\t*/setup.py\n\t*/__init__.py" > .default.coveragerc
python3 -m coverage report --rcfile=.default.coveragerc
python3 -m coverage xml --rcfile=.default.coveragerc
}
function upload_coverage_report {
Expand Down Expand Up @@ -176,10 +177,10 @@ function upload_coverage_report {
cp "$python_report" ./ || echo "No python coverage report"
ici_install_pkgs_for_command pip python3-pip python3-dev python3-wheel
ici_install_pkgs_for_command gem ruby
python3 -m pip install coveralls coveralls-merge
python3 -m pip install coveralls
gem install coveralls-lcov
coveralls-lcov -v -n "$target_ws/coverage.info" > coverage.c.json
coveralls-merge coverage.c.json
coveralls --merge=coverage.c.json --rcfile="$target_ws"/.default.coveragerc
esac
cd "$target_ws" || return 1
}
Expand Down

0 comments on commit 3f5153e

Please sign in to comment.