-
Notifications
You must be signed in to change notification settings - Fork 70
/
.travis.yml
47 lines (44 loc) · 1.49 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
sudo: false
language: go
matrix:
include:
- env: DB=MYSQL5.7
sudo: required
dist: trusty
go: 1.14.x
services:
- docker
before_install:
- go get golang.org/x/tools/cmd/cover
- go get -u github.com/golang/dep/cmd/dep
- dep ensure
- docker pull mysql:5.7
- docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=yes 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
- .travis/wait_mysql.sh
- mysql < testdata/schema/sakila.sql
before_script:
- export TEST_DSN="root:@tcp(127.0.0.1:3307)/sakila?parseTime=true"
- env: DB=MYSQL5.6
sudo: required
dist: trusty
go: 1.14.x
services:
- docker
before_install:
- go get golang.org/x/tools/cmd/cover
- go get -u github.com/golang/dep/cmd/dep
- dep ensure
- docker pull mysql:5.6
- docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql:5.6
--innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB
- sleep 30
- cp .travis/docker.cnf ~/.my.cnf
- .travis/wait_mysql.sh
- mysql < testdata/schema/sakila.sql
before_script:
- export TEST_DSN="root@tcp(127.0.0.1:3307)/sakila?parseTime=true"
script:
- go test -v -race ./...