mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
ci: fix Coveralls issue
This commit is contained in:
@@ -15,5 +15,5 @@ module.exports = {
|
||||
"!**/*.test.js"
|
||||
],
|
||||
"coverageDirectory": "test/coverage",
|
||||
"coverageReporters": ["lcov", "html"]
|
||||
"coverageReporters": [["lcov", {"projectRoot": ".." }], "html"]
|
||||
};
|
||||
|
||||
@@ -3,21 +3,12 @@
|
||||
if [ -d aggregated-coverage ]; then
|
||||
npm install --no-save --no-package-lock "[email protected]" "[email protected]"
|
||||
|
||||
echo "Merging LCOV files"
|
||||
rm -f "aggregated-coverage/merged.lcov"
|
||||
{
|
||||
for lcov in aggregated-coverage/**/*.lcov; do
|
||||
echo "Forcing relative paths in: $lcov"
|
||||
sed -i 's/^SF:.*\(detox-[a-z]\+-[0-9\-]\+-[a-z]\+\)\//SF:/g' $lcov
|
||||
done
|
||||
node_modules/.bin/lcov-result-merger 'aggregated-coverage/**/*.lcov' "aggregated-coverage/merged.lcov"
|
||||
|
||||
echo "Merging LCOV files"
|
||||
node_modules/.bin/lcov-result-merger 'aggregated-coverage/**/*.lcov' "aggregated-coverage/merged.lcov"
|
||||
} && {
|
||||
echo "Uploading to coveralls"
|
||||
cat "aggregated-coverage/merged.lcov" | node_modules/.bin/coveralls
|
||||
} || {
|
||||
echo "Failed to aggregate the test coverage, skipping."
|
||||
}
|
||||
echo "Uploading to coveralls"
|
||||
{ cat "aggregated-coverage/merged.lcov" | node_modules/.bin/coveralls; } || echo "Failed to aggregate the test coverage, skipping."
|
||||
else
|
||||
echo "Aggregated coverage directory was not found, skipping."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user