Skip to content

Commit b103d2e

Browse files
committed
[ENH] Fix paths for coverage in circleci
To understand the test files, the xml files should be placed in a subfolder of ${CIRCLE_TEST_REPORTS} (see https://circleci.com/docs/1.0/test-metadata/#metadata-collection-in-custom-test-steps)
1 parent 26dfd79 commit b103d2e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.circle/codecov.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ set -e # Exit immediately if a command exits with a non-zero status.
99
set -u # Treat unset variables as an error when substituting.
1010
set -x # Print command traces before executing command.
1111

12-
mkdir -p ${CIRCLE_TEST_REPORTS}/
13-
for report in $( ls ~/scratch/*.xml ); do
14-
rname=$( basename $report )
15-
cp ${report} ${CIRCLE_TEST_REPORTS}/${rname:: -4}_${CIRCLE_NODE_INDEX}.xml
16-
done
12+
mkdir -p ${CIRCLE_TEST_REPORTS}/unittests ${CIRCLE_TEST_REPORTS}/smoketest
13+
cp ${SCRATCH}/coverage*.xml ${CIRCLE_TEST_REPORTS}/unittests/
14+
cp ${SCRATCH}/smoketests*.xml ${CIRCLE_TEST_REPORTS}/smoketest/
1715

1816
# Send coverage data to codecov.io
1917
curl -so codecov.io https://codecov.io/bash
2018
chmod 755 codecov.io
2119

22-
find "${CIRCLE_TEST_REPORTS}/" -name 'coverage*.xml' -print0 | \
20+
find "${CIRCLE_TEST_REPORTS}/unittests" -name '*.xml' -print0 | \
2321
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F unittests
24-
find "${CIRCLE_TEST_REPORTS}/" -name 'smoketests*.xml' -print0 | \
22+
find "${CIRCLE_TEST_REPORTS}/smoketest" -name '*.xml' -print0 | \
2523
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F smoketests

0 commit comments

Comments
 (0)