Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set go version to 1.14, to enable vendor builds by default. #2749

Merged
merged 4 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cortexproject/cortex

go 1.13
go 1.14

require (
cloud.google.com/go/bigtable v1.2.0
Expand Down
16 changes: 3 additions & 13 deletions tools/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ set -e

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SLOW=
NO_GO_GET=true
TAGS=
PARALLEL=
RACE="-race -covermode=atomic"
TIMEOUT=5m
VERBOSE=

usage() {
echo "$0 [-slow] [-in-container foo] [-netgo] [-(no-)go-get] [-timeout 1m]"
echo "$0 [-slow] [-in-container foo] [-netgo] [-timeout 1m]"
}

while [ $# -gt 0 ]; do
Expand All @@ -29,14 +28,6 @@ while [ $# -gt 0 ]; do
RACE=
shift 1
;;
"-no-go-get")
NO_GO_GET=true
shift 1
;;
"-go-get")
NO_GO_GET=
shift 1
;;
"-netgo")
TAGS="netgo"
shift 1
Expand Down Expand Up @@ -102,9 +93,6 @@ PACKAGE_BASE=$(go list -e ./)

run_test() {
local dir=$1
if [ -z "$NO_GO_GET" ]; then
go get -t -tags "${TAGS[@]}" "$dir"
fi

local GO_TEST_ARGS_RUN=("${GO_TEST_ARGS[@]}")
if [ -n "$SLOW" ]; then
Expand Down Expand Up @@ -147,6 +135,8 @@ fi

if [ -n "$SLOW" ] && [ -z "$COVERDIR" ]; then
go get github.com/weaveworks/tools/cover
go mod vendor # re-vendor everything
Copy link
Contributor

Choose a reason for hiding this comment

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

What about putting the cover tool into the build image, like we do with various other tools?

RUN GO111MODULE=on go get -tags netgo \
github.com/client9/misspell/cmd/[email protected] \
github.com/golang/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] && \

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will send PR to include cover tool in build image.


cover "$coverdir"/* >profile.cov
rm -rf "$coverdir"
go tool cover -html=profile.cov -o=coverage.html
Expand Down
Loading