.travis.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. language: python
  2. sudo: required
  3. dist: trusty
  4. cache: pip
  5. python:
  6. - '2.7'
  7. - '3.4'
  8. - '3.5'
  9. - '3.6'
  10. os:
  11. - linux
  12. stages:
  13. - lint
  14. - test
  15. env:
  16. global:
  17. - PYTHONUNBUFFERED=yes
  18. matrix:
  19. - MATRIX_TOXENV=unit
  20. - MATRIX_TOXENV=integration-rabbitmq
  21. - MATRIX_TOXENV=integration-redis
  22. - MATRIX_TOXENV=integration-dynamodb
  23. - MATRIX_TOXENV=integration-azureblockblob
  24. matrix:
  25. include:
  26. - python: '3.6'
  27. env: TOXENV=pypy-unit PYPY_VERSION="pypy2.7-6.0.0"
  28. - python: '3.6'
  29. env: TOXENV=pypy-integration-rabbitmq PYPY_VERSION="pypy2.7-6.0.0"
  30. - python: '3.6'
  31. env: TOXENV=pypy-integration-redis PYPY_VERSION="pypy2.7-6.0.0"
  32. - python: '3.6'
  33. env: TOXENV=pypy-integration-dynamodb PYPY_VERSION="pypy2.7-6.0.0"
  34. - python: '3.6'
  35. env: TOXENV=flake8
  36. stage: lint
  37. - python: '3.6'
  38. env: TOXENV=flakeplus
  39. stage: lint
  40. - python: '3.6'
  41. env: TOXENV=apicheck
  42. stage: lint
  43. - python: '3.6'
  44. env: TOXENV=configcheck
  45. stage: lint
  46. - python: '3.6'
  47. env: TOXENV=bandit
  48. stage: lint
  49. - python: '3.6'
  50. env: TOXENV=pydocstyle
  51. stage: lint
  52. - python: '3.6'
  53. env: TOXENV=isort-check
  54. stage: lint
  55. before_install:
  56. - if [[ -v MATRIX_TOXENV ]]; then export TOXENV=${TRAVIS_PYTHON_VERSION}-${MATRIX_TOXENV}; fi; env
  57. - |
  58. if [[ "$TOXENV" =~ "pypy" ]]; then
  59. export PYENV_ROOT="$HOME/.pyenv"
  60. if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
  61. cd "$PYENV_ROOT" && git pull
  62. else
  63. rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/pyenv/pyenv.git "$PYENV_ROOT"
  64. fi
  65. "$PYENV_ROOT/bin/pyenv" install "$PYPY_VERSION"
  66. virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
  67. source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
  68. which python
  69. fi
  70. - |
  71. if [[ "$TOXENV" == *dynamodb ]]; then
  72. docker run -d -p 8000:8000 dwmkerr/dynamodb:38 -inMemory
  73. while ! nc -zv 127.0.0.1 8000; do sleep 10; done
  74. fi
  75. - |
  76. docker run -d -e executable=blob -t -p 10000:10000 --tmpfs /opt/azurite/folder:rw arafato/azurite:2.6.5
  77. while ! nc -zv 127.0.0.1 10000; do sleep 10; done
  78. export AZUREBLOCKBLOB_URL="azureblockblob://DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
  79. - |
  80. wget -qO - https://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
  81. sudo apt-add-repository -y 'deb http://packages.couchbase.com/ubuntu trusty trusty/main'
  82. sudo apt-get update && sudo apt-get install -y libcouchbase-dev
  83. after_success:
  84. - |
  85. if [[ -v MATRIX_TOXENV || "$TOXENV" =~ "pypy" ]]; then
  86. .tox/$TOXENV/bin/coverage xml
  87. .tox/$TOXENV/bin/codecov -e TOXENV
  88. fi;
  89. install: travis_retry pip install -U tox | cat
  90. script: tox -v -- -v
  91. notifications:
  92. irc:
  93. channels:
  94. - "chat.freenode.net#celery"
  95. on_success: change
  96. on_failure: change
  97. services:
  98. - rabbitmq
  99. - redis
  100. - docker