summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-sql-driver/mysql/.travis.yml
blob: cc1268c3613bfb27da6c906bd029d3867d30a6d5 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
sudo: false
language: go
go:
  - 1.7.x
  - 1.8.x
  - 1.9.x
  - 1.10.x
  - master

before_install:
  - go get golang.org/x/tools/cmd/cover
  - go get github.com/mattn/goveralls

before_script:
  - echo -e "[server]\ninnodb_log_file_size=256MB\ninnodb_buffer_pool_size=512MB\nmax_allowed_packet=16MB" | sudo tee -a /etc/mysql/my.cnf
  - sudo service mysql restart
  - .travis/wait_mysql.sh
  - mysql -e 'create database gotest;'

matrix:
  include:
    - env: DB=MYSQL8
      sudo: required
      dist: trusty
      go: 1.10.x
      services:
        - docker
      before_install:
        - go get golang.org/x/tools/cmd/cover
        - go get github.com/mattn/goveralls
        - docker pull mysql:8.0
        - 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:8.0 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
        - cp .travis/docker.cnf ~/.my.cnf
        - .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=MYSQL57
      sudo: required
      dist: trusty
      go: 1.10.x
      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 --local-infile=1
        - cp .travis/docker.cnf ~/.my.cnf
        - .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.10.x
      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 --local-infile=1
        - cp .travis/docker.cnf ~/.my.cnf
        - .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.10.x
      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 --local-infile=1
        - cp .travis/docker.cnf ~/.my.cnf
        - .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

script:
  - go test -v -covermode=count -coverprofile=coverage.out
  - go vet ./...
  - .travis/gofmt.sh
after_script:
  - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci