forked from google/ts-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
26 lines (26 loc) · 881 Bytes
/
.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
language: go
go:
- "1.11"
env:
- DEP_VERSION="0.5.4" CLOUDSDK_CORE_DISABLE_PROMPTS=1
install:
- curl https://sdk.cloud.google.com | bash
- $HOME/google-cloud-sdk/bin/gcloud components install app-engine-python app-engine-go cloud-datastore-emulator
- go get github.com/golang/mock/mockgen
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
- chmod +x $GOPATH/bin/dep
script:
- source $HOME/google-cloud-sdk/path.bash.inc
- go test -v ./...
- dep check
- gofmt -w $(go list -f '{{.Dir}}' ./...)
- go generate ./...
- |
# Check that `gofmt` and `go generate` resulted in no diffs.
status=$(git status --porcelain)
if [[ -n ${status} ]]; then
echo "Regenerated files differ from checked-in versions: ${status}"
git status
git diff
exit 1
fi