sudo: false language: go go: - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 - tip before_install: - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls matrix: include: - env: DB=MYSQL57 sudo: required dist: trusty go: 1.8 services: - docker before_install: - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - docker pull mysql:5.7 - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret mysql:5.7 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB - sleep 30 - cp .travis/docker.cnf ~/.my.cnf - mysql --print-defaults - .travis/wait_mysql.sh before_script: - export MYSQL_TEST_USER=gotest - export MYSQL_TEST_PASS=secret - export MYSQL_TEST_ADDR=127.0.0.1:3307 - export MYSQL_TEST_CONCURRENT=1 - env: DB=MARIA55 sudo: required dist: trusty go: 1.8 services: - docker before_install: - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - docker pull mariadb:5.5 - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret mariadb:5.5 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB - sleep 30 - cp .travis/docker.cnf ~/.my.cnf - mysql --print-defaults - .travis/wait_mysql.sh before_script: - export MYSQL_TEST_USER=gotest - export MYSQL_TEST_PASS=secret - export MYSQL_TEST_ADDR=127.0.0.1:3307 - export MYSQL_TEST_CONCURRENT=1 - env: DB=MARIA10_1 sudo: required dist: trusty go: 1.8 services: - docker before_install: - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - docker pull mariadb:10.1 - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret mariadb:10.1 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB - sleep 30 - cp .travis/docker.cnf ~/.my.cnf - mysql --print-defaults - .travis/wait_mysql.sh before_script: - export MYSQL_TEST_USER=gotest - export MYSQL_TEST_PASS=secret - export MYSQL_TEST_ADDR=127.0.0.1:3307 - export MYSQL_TEST_CONCURRENT=1 before_script: - mysql -e 'create database gotest;' script: - go test -v -covermode=count -coverprofile=coverage.out - go vet ./... - test -z "$(gofmt -d -s . | tee /dev/stderr)" - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci