Skip to content

Commit c684492

Browse files
committed
ci: fix Coveralls issue
1 parent 73c13ee commit c684492

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

detox/test/e2e/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ module.exports = {
1515
"!**/*.test.js"
1616
],
1717
"coverageDirectory": "test/coverage",
18-
"coverageReporters": ["lcov", "html"]
18+
"coverageReporters": [["lcov", {"projectRoot": ".." }], "html"]
1919
};

scripts/aggregate_coverage.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,12 @@
33
if [ -d aggregated-coverage ]; then
44
npm install --no-save --no-package-lock "[email protected]" "[email protected]"
55

6+
echo "Merging LCOV files"
67
rm -f "aggregated-coverage/merged.lcov"
7-
{
8-
for lcov in aggregated-coverage/**/*.lcov; do
9-
echo "Forcing relative paths in: $lcov"
10-
sed -i 's/^SF:.*\(detox-[a-z]\+-[0-9\-]\+-[a-z]\+\)\//SF:/g' $lcov
11-
done
8+
node_modules/.bin/lcov-result-merger 'aggregated-coverage/**/*.lcov' "aggregated-coverage/merged.lcov"
129

13-
echo "Merging LCOV files"
14-
node_modules/.bin/lcov-result-merger 'aggregated-coverage/**/*.lcov' "aggregated-coverage/merged.lcov"
15-
} && {
16-
echo "Uploading to coveralls"
17-
cat "aggregated-coverage/merged.lcov" | node_modules/.bin/coveralls
18-
} || {
19-
echo "Failed to aggregate the test coverage, skipping."
20-
}
10+
echo "Uploading to coveralls"
11+
{ cat "aggregated-coverage/merged.lcov" | node_modules/.bin/coveralls; } || echo "Failed to aggregate the test coverage, skipping."
2112
else
2213
echo "Aggregated coverage directory was not found, skipping."
2314
fi

0 commit comments

Comments
 (0)