circle-test-frontend.sh 406 B

12345678910111213141516171819
  1. #!/bin/bash
  2. function exit_if_fail {
  3. command=$@
  4. echo "Executing '$command'"
  5. eval $command
  6. rc=$?
  7. if [ $rc -ne 0 ]; then
  8. echo "'$command' returned $rc."
  9. exit $rc
  10. fi
  11. }
  12. exit_if_fail npm run test:coverage
  13. exit_if_fail npm run build
  14. # publish code coverage
  15. echo "Publishing javascript code coverage"
  16. bash <(curl -s https://codecov.io/bash) -cF javascript
  17. rm -rf coverage