forked from PyMySQL/PyMySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (92 loc) · 2.92 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
sudo: false
language: python
python: "3.5"
cache:
directories:
- $HOME/.cache/pip
- $HOME/mysql
env:
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=pypy
- TOX_ENV=pypy3
matrix:
include:
- addons:
mariadb: 5.5
env:
- TOX_ENV=py27
- EXTRAPKG=mariadb-test
sudo: required
- addons:
mariadb: 10.0
env:
- TOX_ENV=py33
- EXTRAPKG=mariadb-test
- PAMCLEAR=1
sudo: required
- addons:
mariadb: 10.1
env:
- TOX_ENV=py34
- EXTRAPKG=mariadb-test
sudo: required
- env:
- TOX_ENV=py34
- DB=5.6.32
addons:
apt:
packages:
- libaio-dev
python: 3.3
- env:
- TOX_ENV=py34
- DB=5.7.14
addons:
apt:
packages:
- libaio-dev
python: 3.4
allow_failures:
- env: DB=5.7.14
# different py version from 5.6 and 5.7 as cache seems to be based on py version
# http://dev.mysql.com/downloads/mysql/5.7.html has latest development release version
# really only need libaio1 for DB builds however libaio-dev is whitelisted for container builds and liaio1 isn't
install:
- if [ -n "${EXTRAPKG}" ]; then
sudo apt-get install ${EXTRAPKG};
fi
- if [ -n "${PAMCLEAR}" ]; then
echo -e '[mysqld]\n\npam-use-cleartext-plugin' | sudo tee -a /etc/mysql/conf.d/pam-cleartext.cnf;
mysql -u root -e "install plugin pam soname 'auth_pam.so'";
sudo service mysql restart;
fi
- export PASSWORD=travis;
- export PAMSERVICE=chfn;
- pip install -U tox coveralls
before_script:
- ./.travis/initializedb.sh
- mysql -e 'create database test_pymysql DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
- mysql -e 'create database test_pymysql2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
- mysql -u root -e "create user travis_pymysql2 identified by 'some password'; grant all on test_pymysql2.* to travis_pymysql2;"
- mysql -u root -e "create user travis_pymysql2@localhost identified by 'some password'; grant all on test_pymysql2.* to travis_pymysql2@localhost;"
- mysql -e 'select VERSION()'
- rm -f ~/.my.cnf # set in .travis.initialize.db.sh for the above commands - we should be using database.json however
- export COVERALLS_PARALLEL=true
script:
- tox -e $TOX_ENV
after_success:
- coveralls
- cat /tmp/mysql.err
- if [ -n "${PAMCLEAR}" ]; then
sudo cat /var/log/syslog;
fi
after_failure:
- cat /tmp/mysql.err
- if [ -n "${PAMCLEAR}" ]; then
sudo cat /var/log/syslog;
fi