forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (58 loc) · 2.76 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
# Travis CI configuration for Vitess.
#
# Note that we have our own test runner written in Go (test.go) which downloads
# our bootstrap Docker image and runs all tests within Docker.
# This solution is slower than running the tests natively, but has the
# advantage that we do not have to install (and cache) any dependencies within
# Travis itself.
#
# For the record, we expect the following overhead per Travis build:
# - 20 seconds Travis starting up the VM.
# - Up to 2 minutes to pull the Docker image.
# - More than a minute to run "make build" and cache the result as temporary
# Docker image.
#
# In total, it will always take up to 4 minutes until the environment is
# bootstrapped and the first test can be run.
#
# Open TODOs:
# - Re-add travis/check_make_proto.sh, ideally as part of test/config.json.
# - Add a presubmit which checks that vendor/vendor.json is the same as in the Docker image. This will prevent people from making changes to it without pushing new bootstrap Docker images.
# sudo is required because we run Docker in our builds.
# See: https://docs.travis-ci.com/user/docker/
sudo: required
services:
- docker
language: go
go:
- 1.11.x
go_import_path: vitess.io/vitess
env:
global:
# Run go build and test with -p 4 (i.e. up to 4 packages are compiled/tested in parallel).
# As of 07/2015 this value works best in a Travis CI container.
# TODO(mberlin): This will probably not be passed through to Docker. Verify and fix this.
- VT_GO_PARALLEL_VALUE=4
# Note: The per test timeout must always be < 10 minutes because test.go
# does not produce any log output while running and Travis kills a
# build after 10 minutes without log output.
# See: https://docs.travis-ci.com/user/customizing-the-build#Build-Timeouts
# To diagnose stuck tests, add "-follow" to TEST_FLAGS below. Then test.go
# will print the test's output.
- TEST_FLAGS="-docker -use_docker_cache -timeout=8m -print-log"
matrix:
# NOTE: Travis CI schedules up to 5 tests simultaneously.
# All our tests should be spread out as evenly as possible across these 5 slots.
# We should always utilize all 5 slots because the cost of the setup is high (up to four minutes).
- TEST_MATRIX="-shard 0"
- TEST_MATRIX="-shard 1"
- TEST_MATRIX="-shard 2"
- TEST_MATRIX="-shard 3"
- TEST_MATRIX="-shard 4"
script:
- go run test.go $TEST_FLAGS $TEST_MATRIX
# Uncomment the next line to verify the GOMAXPROCS value (should be 2 as of 09/2017).
# - ./docker/test/run.sh mysql57 'go run travis/log_gomaxprocs.go'
notifications:
slack:
secure: S9n4rVWuEvSaF9RZUIx3Nkc2ycpM254zmalyMMbT5EmV1Xz6Zww2FL39RR5d57zsZ2M8GVW5n9uB8Bx57mr+L/wClEltzknYr7MA2/yYNMo5iK83tdQtNNw5U+dZG9/Plhlm4n883lcw9aZOyotNcLg2zBsd48Y74olk4NdmSfo=