Skip to content

Commit c0f6b44

Browse files
authored
travis: add macOS test (#939)
1 parent bc5e6ea commit c0f6b44

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.travis.yml

+21
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,27 @@ matrix:
9999
- export MYSQL_TEST_ADDR=127.0.0.1:3307
100100
- export MYSQL_TEST_CONCURRENT=1
101101

102+
- os: osx
103+
osx_image: xcode10.1
104+
addons:
105+
homebrew:
106+
packages:
107+
- mysql
108+
go: 1.12.x
109+
before_install:
110+
- go get golang.org/x/tools/cmd/cover
111+
- go get github.com/mattn/goveralls
112+
before_script:
113+
- echo -e "[server]\ninnodb_log_file_size=256MB\ninnodb_buffer_pool_size=512MB\nmax_allowed_packet=16MB\nlocal_infile=1" >> /usr/local/etc/my.cnf
114+
- mysql.server start
115+
- mysql -uroot -e 'CREATE USER gotest IDENTIFIED BY "secret"'
116+
- mysql -uroot -e 'GRANT ALL ON *.* TO gotest'
117+
- mysql -uroot -e 'create database gotest;'
118+
- export MYSQL_TEST_USER=gotest
119+
- export MYSQL_TEST_PASS=secret
120+
- export MYSQL_TEST_ADDR=127.0.0.1:3306
121+
- export MYSQL_TEST_CONCURRENT=1
122+
102123
script:
103124
- go test -v -covermode=count -coverprofile=coverage.out
104125
- go vet ./...

0 commit comments

Comments
 (0)