2017-02-12 11:13:54 +00:00
language : go
go :
2019-01-01 08:57:46 +00:00
- "1.9"
- "1.10"
2017-02-12 11:13:54 +00:00
addons :
apt :
2019-01-01 08:57:46 +00:00
sources :
- mysql-5.7-trusty
2017-02-12 11:13:54 +00:00
packages :
2019-01-01 08:57:46 +00:00
- mysql-server
- mysql-client
before_install :
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade
2017-02-12 11:13:54 +00:00
# stop mysql and use row-based format binlog
2019-01-01 08:57:46 +00:00
- "sudo service mysql stop || true"
2017-02-12 11:13:54 +00:00
- "echo '[mysqld]' | sudo tee /etc/mysql/conf.d/replication.cnf"
- "echo 'server-id=1' | sudo tee -a /etc/mysql/conf.d/replication.cnf"
2019-01-01 08:57:46 +00:00
- "echo 'log-bin=mysql' | sudo tee -a /etc/mysql/conf.d/replication.cnf"
2017-02-12 11:13:54 +00:00
- "echo 'binlog-format = row' | sudo tee -a /etc/mysql/conf.d/replication.cnf"
# Start mysql (avoid errors to have logs)
2019-01-01 08:57:46 +00:00
- "sudo service mysql start || true"
2017-02-12 11:13:54 +00:00
- "sudo tail -1000 /var/log/syslog"
- mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot
script :
2019-01-01 08:57:46 +00:00
- make test