Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

address comments from #11 #15

Merged
merged 6 commits into from
Sep 13, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: scripts/test_go.sh: skip coveralls step if not running in CI
  • Loading branch information
johnstcn committed Sep 13, 2021
commit e4a32e0777e5ef59d4e9ef1c35c97e8333349f60
16 changes: 10 additions & 6 deletions scripts/test_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Run unit and integration tests for Go code

set -euo pipefail
CI=${CI:-""}
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
cd "$PROJECT_ROOT"
source "./scripts/lib.sh"
Expand Down Expand Up @@ -49,11 +50,14 @@ run_trace false gotestsum tool slowest \
--jsonfile="$TESTREPORT_JSON" \
--threshold="$threshold"

# From time to time, Coveralls seems to have an issue on their end, so
# make a best-effort attempt to upload coverage but ignore failures
set +e
echo "--- Uploading test coverage report to Coveralls..."
run_trace false goveralls -service=github -coverprofile="$COVERAGE"
set -e
# Skip coveralls if not running in CI
if [[ -n "${CI}" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yeah. We don't use this script to run local tests in the monorepo, which is why we didn't need that check there 🤷‍♂️

# From time to time, Coveralls seems to have an issue on their end, so
# make a best-effort attempt to upload coverage but ignore failures
set +e
echo "--- Uploading test coverage report to Coveralls..."
run_trace false goveralls -service=github -coverprofile="$COVERAGE"
set -e
fi

exit $test_status