.travis.yml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. before_install:
  53. - if [[ -v MATRIX_TOXENV ]]; then export TOXENV=${TRAVIS_PYTHON_VERSION}-${MATRIX_TOXENV}; fi; env
  54. - |
  55. if [[ "$TOXENV" =~ "pypy" ]]; then
  56. export PYENV_ROOT="$HOME/.pyenv"
  57. if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
  58. cd "$PYENV_ROOT" && git pull
  59. else
  60. rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/pyenv/pyenv.git "$PYENV_ROOT"
  61. fi
  62. "$PYENV_ROOT/bin/pyenv" install "$PYPY_VERSION"
  63. virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
  64. source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
  65. which python
  66. fi
  67. - |
  68. if [[ "$TOXENV" == *dynamodb ]]; then
  69. docker run -d -p 8000:8000 dwmkerr/dynamodb:38 -inMemory
  70. while ! nc -zv 127.0.0.1 8000; do sleep 10; done
  71. fi
  72. - |
  73. docker run -d -e executable=blob -t -p 10000:10000 --tmpfs /opt/azurite/folder:rw arafato/azurite:2.6.5
  74. while ! nc -zv 127.0.0.1 10000; do sleep 10; done
  75. export AZUREBLOCKBLOB_URL="azureblockblob://DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
  76. - |
  77. wget -qO - https://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
  78. sudo apt-add-repository -y 'deb http://packages.couchbase.com/ubuntu trusty trusty/main'
  79. sudo apt-get update && sudo apt-get install -y libcouchbase-dev
  80. after_success:
  81. - |
  82. if [[ -v MATRIX_TOXENV || "$TOXENV" =~ "pypy" ]]; then
  83. .tox/$TOXENV/bin/coverage xml
  84. .tox/$TOXENV/bin/codecov -e TOXENV
  85. fi;
  86. install: travis_retry pip install -U tox | cat
  87. script: tox -v -- -v
  88. notifications:
  89. irc:
  90. channels:
  91. - "chat.freenode.net#celery"
  92. on_success: change
  93. on_failure: change
  94. services:
  95. - rabbitmq
  96. - redis
  97. - docker