.travis.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. language: python
  2. sudo: false
  3. env: PIP=pip3 PYTHON=python3
  4. dist: xenial
  5. matrix:
  6. include:
  7. - os: linux
  8. python: 3.5
  9. - os: linux
  10. python: 3.6
  11. - os: linux
  12. python: 3.7
  13. - os: osx
  14. language: generic
  15. - os: linux
  16. python: 3.5
  17. sudo: required
  18. env: WINE_PYTHON=3.5.4 PIP='wine pip' PYTHON='wine python'
  19. notifications:
  20. webhooks:
  21. - https://coveralls.io/webhook?repo_token=COVERALLS_REPO_TOKEN
  22. before_install:
  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/winehq.key -O winehq.key &&
  28. sudo apt-key add winehq.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 coverage coveralls
  52. - ${PIP} install --upgrade --editable .[test,md5,bcrypt]
  53. script:
  54. - ${PYTHON} setup.py test
  55. after_success:
  56. - |
  57. if [ "${TRAVIS_OS_NAME}" == linux -a -n "${WINE_PYTHON}" ]; then
  58. config="$(mktemp)"
  59. printf '[paths]\nsource =\n .\n %s\n' "$(winepath --windows '')" >"${config}"
  60. coverage3 combine --rcfile "${config}" .coverage
  61. fi
  62. - env COVERALLS_PARALLEL=true coveralls