Could someone help me setting up travis?

I can’t get Travis to work for my Go project, I use the following configuration file:

language: go

go:
  - master

go_import_path:
  - github.com/metonimie/simpleFTP

install:
#  - go get -t -v ./...
  - go get -t -v github.com/fsnotify/fsnotify
  - go get -t -v github.com/spf13/viper
  - go get -t -v github.com/hashicorp/hcl
  - go get -t -v github.com/magiconair/properties
  - go get -t -v github.com/mitchellh/mapstructure
  - go get -t -v github.com/pelletier/go-toml
  - go get -t -v github.com/spf13/afero

script:
  - go test ./...
  - go test -v -race ./...
  - go vet ./...

Error:

server/simplFTP.go:9:2: cannot find package "github.com/metonimie/simpleFTP/server/server" in any of:

	/home/travis/.gimme/versions/go/src/github.com/metonimie/simpleFTP/server/server (from $GOROOT)

	/home/travis/gopath/src/github.com/metonimie/simpleFTP/server/server (from $GOPATH)

server/server/connection.go:20:2: cannot find package "github.com/metonimie/simpleFTP/server/server/config" in any of:

	/home/travis/.gimme/versions/go/src/github.com/metonimie/simpleFTP/server/server/config (from $GOROOT)

	/home/travis/gopath/src/github.com/metonimie/simpleFTP/server/server/config (from $GOPATH)

server/server/commands.go:14:2: cannot find package "github.com/zyxar/image2ascii/ascii" in any of:

	/home/travis/.gimme/versions/go/src/github.com/zyxar/image2ascii/ascii (from $GOROOT)

	/home/travis/gopath/src/github.com/zyxar/image2ascii/ascii (from $GOPATH)

I have no idea how to fix the first two import issues, since they are my project.

Should that package (…/server/server) exist? It’s hard for us to tell as the repo in question doesn’t exist on Github or is private.

Oh, I renamed my repo on Github but locally I had the same folder structure.

The repo url is the following: https://github.com/Metonimie/simplFT

I’m gonna do some renaming and report back

The build is still failing

server/simplFTP.go:9:2: cannot find package "github.com/metonimie/simplFT/server/server" in any of:

	/home/travis/.gimme/versions/go/src/github.com/metonimie/simplFT/server/server (from $GOROOT)

	/home/travis/gopath/src/github.com/metonimie/simplFT/server/server (from $GOPATH)

server/server/connection.go:20:2: cannot find package "github.com/metonimie/simplFT/server/server/config" in any of:

	/home/travis/.gimme/versions/go/src/github.com/metonimie/simplFT/server/server/config (from $GOROOT)

	/home/travis/gopath/src/github.com/metonimie/simplFT/server/server/config (from $GOPATH)

Your GitHub URL has your user name with an initial capital, while your package path does not. Which is it?

1 Like

Thank you, this has solved my problem. :grinning:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.