diff --git a/src/flamenco/runtime/tests/run_nightly_tests.sh b/src/flamenco/runtime/tests/run_nightly_tests.sh index 5ae525f441..50cb990d77 100755 --- a/src/flamenco/runtime/tests/run_nightly_tests.sh +++ b/src/flamenco/runtime/tests/run_nightly_tests.sh @@ -18,6 +18,10 @@ while [[ $# -gt 0 ]]; do SLACK_WEBHOOK_URL="$2" shift 2 ;; + -cc|--codecov-token) + CODECOV_TOKEN="$2" + shift 2 + ;; *) echo "Unknown flag" exit 1 @@ -36,6 +40,11 @@ if [ -z "${SLACK_WEBHOOK_URL}" ]; then exit 1 fi +if [ -z "${CODECOV_TOKEN}" ]; then + echo "Error: Codecov token not specified" + exit 1 +fi + # Pull the latest code cd $REPO_DIR git checkout $BRANCH @@ -103,3 +112,13 @@ json_payload=$(cat < ${REPO_DIR}/${OBJDIR}/cov/raw/codecov.lcov + +curl -Os https://uploader.codecov.io/latest/linux/codecov +chmod +x codecov +./codecov -f ${REPO_DIR}/${OBJDIR}/cov/raw/codecov.lcov -t $CODECOV_TOKEN -F nightly_ledgers --name dist-cov-nightly-report +rm codecov +rm ${REPO_DIR}/${OBJDIR}/cov/raw/ -rf