forked from major/MySQLTuner-perl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (47 loc) · 1.41 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
48
49
50
51
52
53
54
language: perl
perl:
- "5.24"
os: linux
dist: focal
services:
- docker
env:
- DB=mariadb:5.5
- DB=mariadb:10.2
- DB=mariadb:10.3
- DB=mariadb:10.4
- DB=mariadb:10.5
- DB=mysql:5.5
- DB=mysql:5.7
- DB=mysql:8.0
- DB=percona:5.6
- DB=percona:5.7
- DB=percona:8.0
install:
- cpanm --quiet --notest Data::Dumper
- cpanm --quiet --notest JSON
- cpanm --quiet --notest Perl::Critic
- cpanm --quiet --notest Text::Template
before_script:
- mysql --version
- mysqladmin --version
- docker run -it --name=mysqltestinstance -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
- echo -e "[client]\nuser=root\npassword=\"\"\nhost=127.0.0.1" > ~/.my.cnf
- chmod 600 ~/.my.cnf
- git clone https://github.com/datacharmer/test_db.git
- cd test_db
- count=10
- while ! mysql -e 'select version()' && [ $count -gt 0 ]; do echo $count seconds to go; sleep 1; count=$(( $count - 1 )); done
- if [[ $DB =~ .*:8.0 ]] ; then
for file in public_key.pem ca.pem server-cert.pem client-key.pem client-cert.pem ; do
docker cp mysqltestinstance:/var/lib/mysql/$file "${HOME}" ;
done ;
fi
- "cat employees.sql | grep -v 'storage_engine' | mysql"
- cd ..
script:
- ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt"
after_script:
- docker stop mysqltestinstance
- echo "Standard Output: $(cat stdout.txt)"
- echo "Standard Error : $(cat stderr.txt)"