From 23f49bf78b202d8330f1d3b4aa25199550c97414 Mon Sep 17 00:00:00 2001 From: Tomas Baca Date: Wed, 29 Nov 2023 09:23:09 +0100 Subject: [PATCH] polishing --- .ci/publish_coverage.sh | 5 ++++- .ci/test.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/publish_coverage.sh b/.ci/publish_coverage.sh index 3936f91900..d86b9d5fed 100755 --- a/.ci/publish_coverage.sh +++ b/.ci/publish_coverage.sh @@ -43,7 +43,7 @@ ARGS="" for file in `ls $ARTIFACT_FOLDER | grep ".info"`; do - ARGS="-a ${ARTIFACT_FOLDER}/${file}" + ARGS="${ARGS} -a ${ARTIFACT_FOLDER}/${file}" done @@ -54,3 +54,6 @@ genhtml -o /tmp/coverage_html /tmp/coverage.info | tee /tmp/coverage.log COVERAGE_PCT=`cat /tmp/coverage.log | tail -n 1 | awk '{print $2}'` echo "Coverage: $COVERAGE_PCT" + +pip install pybadges +python -m pybadges --left-text="test coverage" --right-text="${COVERAGE_PCT}" --right-color='#0c0' > /tmp/coverage_html/badge.svg diff --git a/.ci/test.sh b/.ci/test.sh index 1b7b7a865a..7fc70ff5f3 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -78,5 +78,5 @@ echo "$0: tests finished" echo "$0: storing coverage data" lcov --capture --directory ${WORKSPACE} --output-file /tmp/coverage.original -lcov --remove /tmp/coverage.original "*/test/" --output-file /tmp/coverage.removed || echo "$0: coverage tracefile is empty" +lcov --remove /tmp/coverage.original "*/test/*" --output-file /tmp/coverage.removed || echo "$0: coverage tracefile is empty" lcov --extract /tmp/coverage.removed "*/workspace/*" --output-file $ARTIFACT_FOLDER/$REPOSITORY_NAME.info || echo "$0: coverage tracefile is empty"