From 1f24f16c3f97b61481d805816f7fe0ebdffd86f7 Mon Sep 17 00:00:00 2001 From: Kunal Bhargava Date: Fri, 24 May 2024 21:14:45 +0000 Subject: [PATCH] add codecov to nightly --- .../runtime/tests/run_nightly_tests.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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