#!/usr/bin/env sh

yarn test -- --coverage
STATUS=$?
curl -s https://codecov.internal.justin.tv/bash | bash -s - -t $CODECOV_TOKEN
# copy coverage files to dist so we can access them on the agent
rsync -a --delete --chown 15000:15000 --numeric-ids /opt/twilight/coverage/ /dist/
exit $STATUS
