1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- language: python
- sudo: required
- dist: trusty
- cache: pip
- python:
- - '2.7'
- - '3.4'
- - '3.5'
- - '3.6'
- os:
- - linux
- stages:
- - lint
- - test
- env:
- global:
- - PYTHONUNBUFFERED=yes
- matrix:
- - MATRIX_TOXENV=unit
- - MATRIX_TOXENV=integration-rabbitmq
- - MATRIX_TOXENV=integration-redis
- - MATRIX_TOXENV=integration-dynamodb
- - MATRIX_TOXENV=integration-azureblockblob
- matrix:
- include:
- - python: '3.6'
- env: TOXENV=pypy-unit PYPY_VERSION="pypy2.7-6.0.0"
- - python: '3.6'
- env: TOXENV=pypy-integration-rabbitmq PYPY_VERSION="pypy2.7-6.0.0"
- - python: '3.6'
- env: TOXENV=pypy-integration-redis PYPY_VERSION="pypy2.7-6.0.0"
- - python: '3.6'
- env: TOXENV=pypy-integration-dynamodb PYPY_VERSION="pypy2.7-6.0.0"
- - python: '3.6'
- env: TOXENV=flake8
- stage: lint
- - python: '3.6'
- env: TOXENV=flakeplus
- stage: lint
- - python: '3.6'
- env: TOXENV=apicheck
- stage: lint
- - python: '3.6'
- env: TOXENV=configcheck
- stage: lint
- - python: '3.6'
- env: TOXENV=bandit
- stage: lint
- - python: '3.6'
- env: TOXENV=pydocstyle
- stage: lint
- before_install:
- - if [[ -v MATRIX_TOXENV ]]; then export TOXENV=${TRAVIS_PYTHON_VERSION}-${MATRIX_TOXENV}; fi; env
- - |
- if [[ "$TOXENV" =~ "pypy" ]]; then
- export PYENV_ROOT="$HOME/.pyenv"
- if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
- cd "$PYENV_ROOT" && git pull
- else
- rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/pyenv/pyenv.git "$PYENV_ROOT"
- fi
- "$PYENV_ROOT/bin/pyenv" install "$PYPY_VERSION"
- virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
- source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
- which python
- fi
- - |
- if [[ "$TOXENV" == *dynamodb ]]; then
- docker run -d -p 8000:8000 dwmkerr/dynamodb:38 -inMemory
- while ! nc -zv 127.0.0.1 8000; do sleep 10; done
- fi
- - |
- docker run -d -e executable=blob -t -p 10000:10000 --tmpfs /opt/azurite/folder:rw arafato/azurite:2.6.5
- while ! nc -zv 127.0.0.1 10000; do sleep 10; done
- export AZUREBLOCKBLOB_URL="azureblockblob://DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
- - |
- wget -qO - https://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
- sudo apt-add-repository -y 'deb http://packages.couchbase.com/ubuntu trusty trusty/main'
- sudo apt-get update && sudo apt-get install -y libcouchbase-dev
- after_success:
- - |
- if [[ -v MATRIX_TOXENV || "$TOXENV" =~ "pypy" ]]; then
- .tox/$TOXENV/bin/coverage xml
- .tox/$TOXENV/bin/codecov -e TOXENV
- fi;
- install: travis_retry pip install -U tox | cat
- script: tox -v -- -v
- notifications:
- irc:
- channels:
- - "chat.freenode.net#celery"
- on_success: change
- on_failure: change
- services:
- - rabbitmq
- - redis
- - docker
|