Skip to content

Commit fe7b0f8

Browse files
committed
fix lcov
1 parent eb65256 commit fe7b0f8

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/coverage.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,28 @@ jobs:
5454
run: |
5555
LCOV_FILES=$(find coverage-artifacts -name "lcov.info" -type f)
5656
57-
if [ -z "$LCOV_FILES" ]; then
57+
if [ -z "${LCOV_FILES}" ]; then
5858
echo "No lcov.info files found in the artifacts!"
5959
exit 1
6060
fi
6161
62-
CMD="lcov"
63-
for LCOV_FILE in $LCOV_FILES; do
64-
echo "Adding coverage file: $LCOV_FILE"
65-
CMD+=" -a $LCOV_FILE"
62+
CMD="$(which "lcov")"
63+
CMD+=" --ignore-errors format"
64+
for LCOV_FILE in ${LCOV_FILES}; do
65+
echo "Adding coverage file: ${LCOV_FILE}"
66+
CMD+=" -a ${LCOV_FILE}"
6667
done
6768
CMD+=" -o lcov.info"
6869
69-
echo "Executing: $CMD"
70-
eval $CMD
70+
echo "Executing: `${CMD}`"
71+
eval "${CMD}"
7172
7273
if [ ! -f "lcov.info" ]; then
7374
echo "Failed to generate merged lcov.info file!"
7475
exit 1
7576
fi
7677
77-
echo "Successfully merged $(echo $LCOV_FILES | wc -w) coverage files."
78+
echo "Successfully merged $(echo "${LCOV_FILES}" | wc -w) coverage files."
7879
- name: Report coverage
7980
uses: k1LoW/octocov-action@v1
8081
with:

0 commit comments

Comments
 (0)