.travis.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. sudo: required
  2. dist: trusty
  3. language: python
  4. matrix:
  5. include:
  6. - os: linux
  7. python: "2.7"
  8. env: COVERALLS=1
  9. - os: linux
  10. python: "3.4"
  11. - os: linux
  12. python: "3.5"
  13. - os: linux
  14. python: "3.6"
  15. - os: osx
  16. language: generic
  17. env:
  18. - OSXENV=3.6.0
  19. - os: osx
  20. language: generic
  21. env:
  22. - OSXENV=2.7.14
  23. install:
  24. - export PYVER=${TRAVIS_PYTHON_VERSION:0:1}
  25. - if [ $PYVER = 3 ]; then
  26. export PYCMD=python3;
  27. export PIPCMD=pip3;
  28. else
  29. export PYCMD=python;
  30. export PIPCMD=pip;
  31. fi;
  32. - if [ $COVERALLS = 1 ]; then
  33. $PIPCMD install --upgrade coveralls;
  34. fi;
  35. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  36. brew update;
  37. brew install pyenv;
  38. brew upgrade pyenv;
  39. brew install pyenv-virtualenv;
  40. eval "$(pyenv init -)";
  41. eval "$(pyenv virtualenv-init -)";
  42. pyenv install $OSXENV;
  43. pyenv virtualenv $OSXENV venv;
  44. pyenv activate venv;
  45. which python;
  46. python --version;
  47. which pip;
  48. export PYCMD=python;
  49. export PIPCMD=pip;
  50. fi;
  51. - $PIPCMD install lxml enum34 pyyaml rdflib
  52. script:
  53. - which $PYCMD
  54. - $PYCMD setup.py build
  55. - if [ $COVERALLS = 1 ]; then
  56. coverage${PYVER} run --source=odml setup.py test && coverage${PYVER} report -m;
  57. else
  58. $PYCMD setup.py test;
  59. fi;
  60. after_success:
  61. - if [ $COVERALLS = 1 ]; then coveralls; fi;