vitess-gh/.travis.yml

62 строки
2.7 KiB
YAML

# 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 if bootstrap has changed, and docker image is out of date.
# 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.12.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=