File tree Expand file tree Collapse file tree 5 files changed +35
-39
lines changed Expand file tree Collapse file tree 5 files changed +35
-39
lines changed Original file line number Diff line number Diff line change @@ -2,32 +2,7 @@ language: ruby
2
2
bundler_args : --without benchmarks development
3
3
before_install :
4
4
- gem --version
5
- - |
6
- bash -c " # Install MySQL 5.7 if DB=mysql57
7
- if [[ x$DB =~ mysql57 ]]; then
8
- sudo bash .travis_mysql57.sh
9
- fi
10
- "
11
- - |
12
- bash -c " # Install MariaDB if DB=mariadb
13
- if [[ x$DB =~ xmariadb ]]; then
14
- sudo bash .travis_mariadb.sh '$DB'
15
- fi
16
- "
17
- - |
18
- bash -c " # Install MySQL if OS=darwin
19
- if [[ x$OSTYPE =~ ^xdarwin ]]; then
20
- brew install mysql
21
- mysql.server start
22
- fi
23
- "
24
- - |
25
- bash -c " # Configure SSL support
26
- if [[ ! x$OSTYPE =~ ^xdarwin ]]; then
27
- sudo bash .travis_ssl.sh
28
- sudo service mysql restart
29
- fi
30
- "
5
+ - bash .travis_setup.sh
31
6
- mysqld --version
32
7
- mysql -u root -e "CREATE DATABASE IF NOT EXISTS test"
33
8
- mysql -u root -e "CREATE USER '$USER'@'localhost'" || true
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/bin/env bash
2
+
3
+ set -eu
2
4
3
5
service mysql stop
4
6
apt-get purge ' ^mysql*' ' libmysql*'
5
- apt-get install python-software-properties
6
7
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
7
8
8
9
if [[ x$1 = xmariadb55 ]]; then
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/ bin/env bash
2
2
3
- service mysql stop
3
+ set -eu
4
4
5
+ service mysql stop
5
6
apt-get purge ' ^mysql*' ' libmysql*'
6
- apt-get autoclean
7
-
8
- rm -rf /var/lib/mysql
9
- rm -rf /var/log/mysql
10
-
11
- apt-get install python-software-properties
12
7
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x8C718D3B5072E1F5
8
+
13
9
add-apt-repository ' deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.7-dmr'
14
10
15
11
apt-get update
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -eu
4
+
5
+ # Install MySQL 5.7 if DB=mysql57
6
+ if [[ -n ${DB-} && x$DB =~ mysql57 ]]; then
7
+ sudo bash .travis_mysql57.sh
8
+ fi
9
+
10
+ # Install MariaDB if DB=mariadb
11
+ if [[ -n ${DB-} && x$DB =~ xmariadb ]]; then
12
+ sudo bash .travis_mariadb.sh " $DB "
13
+ fi
14
+
15
+ # Install MySQL if OS=darwin
16
+ if [[ x$OSTYPE =~ ^xdarwin ]]; then
17
+ brew install mysql
18
+ mysql.server start
19
+ fi
20
+
21
+ # TODO: get SSL working on OS X in Travis
22
+ if ! [[ x$OSTYPE =~ ^xdarwin ]]; then
23
+ sudo bash .travis_ssl.sh
24
+ sudo service mysql restart
25
+ fi
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/ bin/env bash
2
2
3
- # Halt the tests on error
4
- set -e
3
+ set -eu
5
4
6
5
# Wherever MySQL configs live, go there (this is for cross-platform)
7
6
cd $( my_print_defaults --help | grep my.cnf | xargs find 2> /dev/null | xargs dirname)
You can’t perform that action at this time.
0 commit comments