Make sure test deps aren't added to go.mod/go.sum
@@ -19,9 +19,14 @@ else
echo "LICENSE-3rdparty.csv is up to date"
fi
+# make sure the below installed dependencies don't get added to go.mod/go.sum
+# unfortunately there's no better way to fix this than change directory
+# this might get solved in Go 1.14: https://github.com/golang/go/issues/30515
+cd `mktemp -d`
+GO111MODULE=on go get -u golang.org/x/lint/golint
+GO111MODULE=on go get -u gotest.tools/gotestsum@v0.4.1
+cd -
-go get -u golang.org/x/lint/golint
-go get -u gotest.tools/gotestsum@v0.4.1
golint ./...
gotestsum --format testname -- -coverpkg=$(go list ./... | grep -v /test | paste -sd "," -) -coverprofile=coverage.txt -covermode=atomic -v $(go list ./...)
go mod tidy
