forked from google-deepmind/objecthash-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (55 loc) · 1.66 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
env:
global:
# CodeClimate
- CC_TEST_REPORTER_ID=f23f4d159f580cb3c3b44cda538d176938257143cd88c7b39f26a3029d562246
# Go dep
- DEP_VERSION="0.4.1"
language: go
go:
- "1.9"
- "1.10"
- "1.x"
- master
before_install:
# Make CI work for forks.
- export OBJECTHASH_PATH="${GOPATH}/src/github.com/deepmind/objecthash-proto"
- if [ "${TRAVIS_BUILD_DIR}" != "${OBJECTHASH_PATH}" ]; then
mkdir -p "$(dirname "${OBJECTHASH_PATH}")";
mv "${TRAVIS_BUILD_DIR}" "${OBJECTHASH_PATH}";
export TRAVIS_BUILD_DIR="${OBJECTHASH_PATH}";
cd "${TRAVIS_BUILD_DIR}";
fi
# Get Go dep.
- 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"
install:
# Install/update dependencies.
- if [ "${UPDATE_DEPS}" == "true" ]; then
dep ensure -update;
else
dep ensure;
fi;
# Recompile protos using the latest protoc-gen-go.
- if [ "${RECOMPILE_PROTOS}" == "true" ]; then
./test_protos/update_protos.sh;
fi
before_script:
# CodeClimate
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
after_script:
# CodeClimate
- cp coverage.out c.out # The coverage file is assumed to be called `c.out`.
- ./cc-test-reporter after-build -t gocov --exit-code $TRAVIS_TEST_RESULT
matrix:
include:
- go: "1.10"
env: RECOMPILE_PROTOS=true
- go: "1.10"
env: UPDATE_DEPS=true
allow_failures:
- go: master
- env: RECOMPILE_PROTOS=true
- env: UPDATE_DEPS=true
fast_finish: true