Having a Golang project and Go workspace. I'm trying to run my test, but I'm having the following error :
api/server.go:8:2: cannot find package "github.com/braintree/manners" in any of:
/usr/local/go/src/github.com/braintree/manners (from $GOROOT)
/go/src/github.com/braintree/manners (from $GOPATH)
The problem comes from that when cloning the project it does it in this folder :
Cloning into '/builds/compagny/project'...
$GOPATH is /go
and then inside that folder I should have something like : src/github.com/compagny/project
I can : export GOPATH=$(pwd), but that doesn't help, Go expect a /src folder.
But I do not have the control where gitlab-ci clone the project, do I?
my gitlab-ci.yml :
stages:
- build
- test
build-my-project:
image: golang:1.6
stage: build
script:
- go get -u github.com/Masterminds/glide
- glide install
- go build
test-my-project:
image: golang:1.6
stage: test
script:
- go get -u github.com/Masterminds/glide
- glide install
- go test -v ./...
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)