.travis.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. language: python
  2. sudo: false
  3. env: PIP=pip3 PYTHON=python3
  4. dist: trusty
  5. matrix:
  6. include:
  7. - os: linux
  8. python: 3.5
  9. - os: linux
  10. python: 3.6
  11. - os: osx
  12. language: generic
  13. - os: linux
  14. python: 3.5
  15. sudo: required
  16. env: WINE_PYTHON=3.5.4 PIP='wine pip' PYTHON='wine python'
  17. before_install:
  18. - |
  19. if [ "${TRAVIS_OS_NAME}" == osx ]; then
  20. brew install python3 ||
  21. brew upgrade python3
  22. fi
  23. - |
  24. if [ "${TRAVIS_OS_NAME}" == linux -a -n "${WINE_PYTHON}" ]; then
  25. pushd "$(mktemp -d)" &&
  26. sudo dpkg --add-architecture i386 &&
  27. wget https://dl.winehq.org/wine-builds/Release.key -O Release.key &&
  28. sudo apt-key add Release.key &&
  29. sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/ &&
  30. sudo apt-get update &&
  31. sudo apt-get install -y --no-install-recommends unzip winehq-stable &&
  32. curl "https://www.python.org/ftp/python/${WINE_PYTHON}/python-${WINE_PYTHON}-embed-win32.zip" -o python.zip &&
  33. curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py &&
  34. unzip python.zip -d python &&
  35. pushd python &&
  36. LIB="$(echo python*.zip)" &&
  37. mv "${LIB}" "${LIB}.tmp" &&
  38. unzip "${LIB}.tmp" -d "${LIB}" &&
  39. rm "${LIB}.tmp" &&
  40. popd &&
  41. mv python "$(winepath 'C:\python')" &&
  42. printf %b 'Windows Registry Editor Version 5.00\n'\
  43. '[HKEY_CURRENT_USER\\Environment]\n'\
  44. '"Path"="c:\\\\windows;c:\\\\windows\\\\system;c:\\\\python;c:\\\\python\\\\scripts"\n' > path.reg &&
  45. wine regedit path.reg &&
  46. wine python get-pip.py &&
  47. rm -rf "$(dirs -l +0)" &&
  48. popd
  49. fi
  50. install:
  51. - pip3 install --upgrade codecov
  52. - ${PIP} install --upgrade --editable .[test,md5,bcrypt]
  53. script:
  54. - ${PYTHON} setup.py test
  55. after_success:
  56. - codecov --env WINE_PYTHON