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

View File

@@ -1,84 +1,55 @@
sudo: false sudo: required
dist: trusty
language: python language: python
python: "3.5" python:
cache: - "3.7-dev"
directories: - "3.6"
- $HOME/.cache/pip - "2.6"
- $HOME/mysql - "pypy3.3-5.2-alpha1"
env: cache: pip
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=pypy
- TOX_ENV=pypy3
matrix: matrix:
include: include:
- addons: - addons:
mariadb: 5.5 mariadb: 5.5
env: python: "3.5"
- TOX_ENV=py27
- EXTRAPKG=mariadb-test
sudo: required
- addons: - addons:
mariadb: 10.0 mariadb: 10.0
env: python: "pypy"
- TOX_ENV=py33
- EXTRAPKG=mariadb-test
- PAMCLEAR=1
sudo: required
- addons: - addons:
mariadb: 10.1 mariadb: 10.1
env: python: "2.7"
- TOX_ENV=py34
- EXTRAPKG=mariadb-test
sudo: required
- env: - env:
- TOX_ENV=py34 - DB=5.6.35
- DB=5.6.32
addons: addons:
apt: apt:
packages: packages:
- libaio-dev - libaio-dev
python: 3.3 python: "3.3"
- env: - env:
- TOX_ENV=py34 - DB=5.7.17
- DB=5.7.14
addons: addons:
apt: apt:
packages: packages:
- libaio-dev - libaio-dev
python: 3.4 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 # 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 # 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 # really only need libaio1 for DB builds however libaio-dev is whitelisted for container builds and liaio1 isn't
install: install:
- if [ -n "${EXTRAPKG}" ]; then - if [ -n "${EXTRAPKG}" ]; then
sudo apt-get install ${EXTRAPKG}; sudo apt-get install ${EXTRAPKG};
fi 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 PASSWORD=travis;
- export PAMSERVICE=chfn; - pip install -U coveralls unittest2 coverage
- pip install -U tox coveralls
before_script: before_script:
- ./.travis/initializedb.sh - ./.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 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 -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()' - 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 - 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 - export COVERALLS_PARALLEL=true
script: script:
- tox -e $TOX_ENV - coverage run ./runtests.py
after_success: after_success:
- coveralls - coveralls
- cat /tmp/mysql.err - cat /tmp/mysql.err
- if [ -n "${PAMCLEAR}" ]; then
sudo cat /var/log/syslog;
fi
after_failure: after_failure:
- cat /tmp/mysql.err - cat /tmp/mysql.err
- if [ -n "${PAMCLEAR}" ]; then
sudo cat /var/log/syslog; # vim: sw=2 ts=2 sts=2 expandtab
fi