Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Nov 29, 2023
1 parent fe868b9 commit 23f49bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .ci/publish_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 23f49bf

Please sign in to comment.