forked from google/trillian-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (67 loc) · 2.05 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: ~> 1.0
os: linux
dist: xenial
language: go
go: "1.14.x"
go_import_path: github.com/google/trillian-examples
services:
- mysql
cache:
directories:
- "$HOME/gopath/pkg/mod"
env:
global:
- GO111MODULE=on
GOPROXY=https://proxy.golang.org
jobs:
fast_finish: true
include:
- name: "go mod tidy"
before_install: skip
install: skip
before_script: go mod tidy -v
script: git diff --exit-code -- go.mod go.sum
- name: tests with coverage report
env:
- WITH_COVERAGE=true
after_success:
- bash <(curl -s https://codecov.io/bash)
- name: tests with race detection
env:
- GOFLAGS='-race'
allowed_failures:
- name: "go mod tidy"
install:
- mkdir ../protoc
- |
(
cd ../protoc
wget "https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-${TRAVIS_OS_NAME}-x86_64.zip"
unzip "protoc-3.5.1-${TRAVIS_OS_NAME}-x86_64.zip"
)
- export PATH="$(pwd)/../protoc/bin:$PATH"
# googleapis is not Go code, but it's required for .pb.go regeneration because of API dependencies.
- git clone --depth=1 https://github.com/googleapis/googleapis.git "$GOPATH/src/github.com/googleapis/googleapis"
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.18.0
- go get github.com/golang/protobuf/proto
- go get github.com/golang/protobuf/protoc-gen-go
before_script:
- |
RESETDB="$(go list -f '{{.Dir}}' github.com/google/trillian)/scripts/resetdb.sh"
chmod +x $RESETDB
$RESETDB --force
script:
- set -e
- cd "$HOME/gopath/src/github.com/google/trillian-examples"
- export GO_TEST_TIMEOUT=20m
- ./scripts/presubmit.sh ${WITH_COVERAGE:+--coverage}
- |
# Check re-generation didn't change anything.
echo "Checking that generated files are the same as checked-in versions."
git diff -- --exit-code
- |
if [[ "${WITH_ETCD}" == "true" ]]; then
export ETCD_DIR="${GOPATH}/bin"
fi
- ./gossip/integration/gossip_test.sh
- set +e