misc: Use Go modules on Travis CI

This commit is contained in:
Marius 2019-06-16 17:13:16 +02:00
parent 226638bcc4
commit 774fd3f313
2 changed files with 3 additions and 9 deletions

View File

@ -4,20 +4,12 @@ set -e
install_etcd_pkgs() { install_etcd_pkgs() {
ETCD_VERSION="3.3.10" ETCD_VERSION="3.3.10"
go get -u go.etcd.io/etcd/clientv3
go get -u github.com/chen-anders/go-etcd-harness
wget -q -O /tmp/etcd.tar.gz "https://github.com/etcd-io/etcd/releases/download/v$ETCD_VERSION/etcd-v$ETCD_VERSION-linux-amd64.tar.gz" wget -q -O /tmp/etcd.tar.gz "https://github.com/etcd-io/etcd/releases/download/v$ETCD_VERSION/etcd-v$ETCD_VERSION-linux-amd64.tar.gz"
tar xvzf /tmp/etcd.tar.gz -C /tmp tar xvzf /tmp/etcd.tar.gz -C /tmp
export PATH="$PATH:/tmp/etcd-v$ETCD_VERSION-linux-amd64" export PATH="$PATH:/tmp/etcd-v$ETCD_VERSION-linux-amd64"
} }
# Install the AWS SDK which is explicitly not vendored # Install the etcd binary which is not vendored.
go get -u github.com/aws/aws-sdk-go/service/s3
go get -u github.com/aws/aws-sdk-go/aws/...
go get -u github.com/prometheus/client_golang/prometheus
# Install the etcd packages which are not vendored.
install_etcd_pkgs install_etcd_pkgs
go test ./pkg/... go test ./pkg/...

View File

@ -11,6 +11,8 @@ cache:
directories: directories:
- $HOME/.gimme - $HOME/.gimme
- "$HOME/google-cloud-sdk/" - "$HOME/google-cloud-sdk/"
env:
- GO111MODULE=on
install: install:
- true - true
script: script: