storj/.travis.yml
Egon Elbre 51ae3d6e72
Travis with go1.11 and modules (#479)
* Travis uses Go 1.11
* Use go modules instead of storj-vendor
* Automatic caching of downloaded dependencies
* Ensures that modules incompatible linters run with modules
2018-10-16 20:02:00 +03:00

41 lines
986 B
YAML

language: go
go:
- 1.11.x
git:
depth: 1
cache:
directories:
- /home/travis/cache
services:
- redis
before_script:
# Add an IPv6 config - see the corresponding Travis issue
# https://github.com/travis-ci/travis-ci/issues/8361
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
sudo sh -c 'echo "\n::1 localhost\n" >> /etc/hosts';
fi
before_install:
- source scripts/setup-gopath.sh
- source scripts/install-awscli.sh
install:
- pushd ~
- GOBIN=${GOPATH}/bin GOPATH=~/gotools go get -v github.com/mattn/goveralls
- popd
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin v1.10.2
- go install -v ./...
script:
- ./scripts/check-for-header.sh
- golangci-lint run
- go test -race -v -cover -coverprofile=.coverprofile ./...
- goveralls -coverprofile=.coverprofile -service=travis-ci
- make test-captplanet