fix travis build (#543)

* update some MySQL and PyPy3 versions
* stop using tox
* not use cache for MySQL download
* don't use sudo
* Use trusty vm
* don't install mariadb-test package
* Throw away PAM. I can't maintain it.
* remove tests using same Python version
* travis: Add "3.7-dev" python
This commit is contained in:
INADA Naoki 2017-01-13 17:55:39 +09:00 committed by GitHub
parent e22a14a100
commit 7742180575
1 changed files with 38 additions and 70 deletions

View File

@ -1,84 +1,55 @@
sudo: false
sudo: required
dist: trusty
language: python
python: "3.5"
cache:
directories:
- $HOME/.cache/pip
- $HOME/mysql
python:
- "3.7-dev"
- "3.6"
- "2.6"
- "pypy3.3-5.2-alpha1"
env:
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=pypy
- TOX_ENV=pypy3
cache: pip
matrix:
include:
- addons:
mariadb: 5.5
env:
- TOX_ENV=py27
- EXTRAPKG=mariadb-test
sudo: required
include:
- addons:
mariadb: 5.5
python: "3.5"
- addons:
mariadb: 10.0
env:
- TOX_ENV=py33
- EXTRAPKG=mariadb-test
- PAMCLEAR=1
sudo: required
- addons:
mariadb: 10.0
python: "pypy"
- addons:
mariadb: 10.1
env:
- TOX_ENV=py34
- EXTRAPKG=mariadb-test
sudo: required
- addons:
mariadb: 10.1
python: "2.7"
- env:
- TOX_ENV=py34
- DB=5.6.32
addons:
apt:
packages:
- libaio-dev
python: 3.3
- env:
- DB=5.6.35
addons:
apt:
packages:
- libaio-dev
python: "3.3"
- env:
- DB=5.7.17
addons:
apt:
packages:
- libaio-dev
python: "3.4"
- 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
- pip install -U coveralls unittest2 coverage
before_script:
- ./.travis/initializedb.sh
@ -87,21 +58,18 @@ before_script:
- 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()'
- python -VV
- 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
- coverage run ./runtests.py
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
# vim: sw=2 ts=2 sts=2 expandtab