Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scripts/openshiftci-presubmit-unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,16 @@ cd ../..

# Run unit
make test

# Upload coverage to codecov.io - failures here should not fail the build
(
set +e
CODECOV_TOKEN_FILE="/var/run/codecov-token/CODECOV_TOKEN"
if [[ ! -f "${CODECOV_TOKEN_FILE}" ]]; then
echo "Codecov token not found at ${CODECOV_TOKEN_FILE}, skipping upload"
exit 0
fi
curl -OSs --fail-with-body https://cli.codecov.io/latest/linux/codecov
chmod +x codecov
CODECOV_TOKEN="$(cat "${CODECOV_TOKEN_FILE}")" ./codecov upload-process --flag unit-tests --file cover.out
) || echo "Coverage upload to codecov.io failed, continuing"