forked from petoju/terraform-provider-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (35 loc) · 1.12 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
dist: trusty
sudo: required
language: go
go:
- "1.17.x"
env:
- DB=mysql:5.6 DB_EXTRA=''
- DB=mysql:5.7 DB_EXTRA=''
- DB=mysql:8.0 DB_EXTRA='mysqld --default-authentication-plugin=mysql_native_password'
services:
- docker
script:
- test -d /home/travis/gopath/src/github.com/terraform-providers || mv $(dirname $PWD) /home/travis/gopath/src/github.com/terraform-providers
- make test
- make vet
- sudo service mysql stop
- export MYSQL_HOST=127.0.0.1
- export MYSQL_PORT=3306
- export MYSQL_USERNAME=root
- export MYSQL_ENDPOINT="${MYSQL_HOST}:${MYSQL_PORT}"
- export MYSQL_PASSWORD=''
- docker pull $DB
- docker run -d -p ${MYSQL_HOST}:${MYSQL_PORT}:${MYSQL_PORT} -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e MYSQL_ROOT_PASSWORD='' $DB $DB_EXTRA
- docker ps -a
- |
while ! mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USERNAME} -e 'SELECT 1'; do
echo 'Waiting for MySQL...'
sleep 1;
done;
- mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USERNAME} -e "INSTALL PLUGIN mysql_no_login SONAME 'mysql_no_login.so';"
- make testacc
matrix:
fast_finish: true
allow_failures:
- go: tip