forked from stripe/veneur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (46 loc) · 1.67 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
language: go
go:
- "1.10"
- "1.11"
- tip
install:
- wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip
- unzip protoc-3.1.0-linux-x86_64.zip -d /tmp
- sudo cp /tmp/bin/protoc /usr/bin/protoc
- sudo chmod 777 /usr/bin/protoc
- rm protoc-3.1.0-linux-x86_64.zip
# After a new major version hits stable, replace this link
# It is only used for gofmt
- wget https://storage.googleapis.com/golang/go1.11.linux-amd64.tar.gz
- tar -C /tmp -xvf go1.11.linux-amd64.tar.gz go/bin/gofmt
- sudo mv /tmp/go/bin/gofmt /usr/bin/gofmt
- rm go1.11.linux-amd64.tar.gz
before_script:
- go get -u github.com/ChimeraCoder/gojson/gojson
- go get -d -v github.com/gogo/protobuf/protoc-gen-gogofaster
- pushd $GOPATH/src/github.com/gogo/protobuf
- git fetch
- git checkout v0.5
- popd
- go install github.com/gogo/protobuf/protoc-gen-gogofaster
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- go get -u golang.org/x/tools/cmd/stringer
- pushd $GOPATH/src/golang.org/x/tools/cmd/stringer
- git checkout 25101aadb97aa42907eee6a238d6d26a6cb3c756
- go install
- popd
- go generate
# We need to ignore changes to this one file
# because the go-generated version will have a different
# fileDescriptor0 depending on which version of Go was used
# to build protoc-gen-go.
- git checkout ssf/sample.pb.go
- dep check
- mv vendor ../ && /usr/bin/gofmt -w . && mv ../vendor .
# See the corresponding lines in the Dockerfile for an explanation
# of this logic
- git add .
- git diff --cached
- git diff-index --cached --exit-code HEAD
script:
- go test -race -v -timeout 60s ./...