Skip to content

Commit

Permalink
build: Merge coverage report for coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
jessieweiyi committed Oct 19, 2022
1 parent b6375e3 commit 0a47f17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ styleguide.out/
coverage/
oss-attribution/
temp/
.nyc_output/

.cache/
.vscode/
Expand All @@ -20,3 +21,5 @@ package-lock.json
*.swp

CODECOMMIT_SOURCE_VERSION


8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ echo 'Copy license files'
cp ./LICENSE ${BUILD_FOLDER_LEGACY}
cp ./NOTICE ${BUILD_FOLDER_LEGACY}

echo 'Merge coverage reports'
if ! [ -d .nyc_output/ ]; then mkdir .nyc_output/; fi
find ./packages -type f -name "coverage-final.json" -path "*/coverage/*" -not \( -path "*/node_modules/*" -prune \) \
| nl -bt -nln \
| sed -re 's!^([0-9]+) +\t(.+)$!\2 .nyc_output/coverage-final-\1.json!' \
| xargs -t cp
npx nyc report --reporter lcov

echo 'Copy the examples to published examples folder'
if [ ! -d ${STYLEGUIDE_FOLDER_LEGACY_EXAMPLE} ]; then mkdir -p ${STYLEGUIDE_FOLDER_LEGACY_EXAMPLE} ; fi
pushd ${EXAMPLES_FOLDER}
Expand Down

0 comments on commit 0a47f17

Please sign in to comment.