forked from stripe-archive/falconer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (42 loc) · 1.56 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
language: go
go:
- "1.10"
- 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.10.linux-amd64.tar.gz
- tar -C /tmp -xvf go1.10.linux-amd64.tar.gz go/bin/gofmt
- sudo mv /tmp/go/bin/gofmt /usr/bin/gofmt
- rm go1.10.linux-amd64.tar.gz
before_script:
- go get -u github.com/ChimeraCoder/gojson/gojson
- go get -u github.com/golang/protobuf/protoc-gen-go
- go get -d -v github.com/gogo/protobuf/protoc-gen-gofast
- pushd $GOPATH/src/github.com/gogo/protobuf
- git fetch
- git checkout v0.5
- popd
- go install github.com/gogo/protobuf/protoc-gen-gofast
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- go get -u golang.org/x/tools/cmd/stringer
- 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 falconer.pb.go
- dep check
- mv vendor ../ && 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 ./...