language: python
python:
  - 2.7
  - 3.3
  - 3.4
  - 3.5

sudo: false

addons:
  apt:
    packages:
      - python-numpy

install:
  - pip install -r requirements_dev.txt

script:
  - make tests
  - if ! [ $TRAVIS_PYTHON_VERSION == "3.3" ]; then
      make test-docs;
    fi

after_success:
  - bash <(curl -s https://codecov.io/bash)
  - openssl aes-256-cbc -K $encrypted_de81f81dc49e_key -iv $encrypted_de81f81dc49e_iv -in .pypirc.enc -out ~/.pypirc -d
  - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" -a $TRAVIS_PYTHON_VERSION == "2.7" -a -n "$(grep version setup.py | cut -d \' -f 2 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$')" ]; then
      make publish;
    fi
  - if [ "$TRAVIS_BRANCH" = "beta" -a "$TRAVIS_PULL_REQUEST" = "false" -a $TRAVIS_PYTHON_VERSION == "2.7" -a -n "$(grep version setup.py | cut -d \' -f 2 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+b[0-9]+$')" ]; then
      make publish;
    fi

notifications:
  email: false

language: python
python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6

sudo: false

addons:
  apt:
    packages:
      - python-numpy

install:
  - pip install -r requirements_dev.txt

script:
  - make tests
  - make test-docs

after_success:
  - bash <(curl -s https://codecov.io/bash)
  - openssl aes-256-cbc -K $encrypted_de81f81dc49e_key -iv $encrypted_de81f81dc49e_iv -in .pypirc.enc -out ~/.pypirc -d
  - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" -a $TRAVIS_PYTHON_VERSION == "2.7" -a -n "$(grep version setup.py | cut -d \' -f 2 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$')" ]; then
      make publish;
    fi
  - if [ "$TRAVIS_BRANCH" = "beta" -a "$TRAVIS_PULL_REQUEST" = "false" -a $TRAVIS_PYTHON_VERSION == "2.7" -a -n "$(grep version setup.py | cut -d \' -f 2 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+b[0-9]+$')" ]; then
      make publish;
    fi

notifications:
  email: false

Stop testing python 3.3, start testing 3.6
Stop testing python 3.3, start testing 3.6
