dist: xenial
language: python

python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
  - 3.7
  - 3.8-dev
  - pypy3.5

env:
  # Would be great to test 0.53 but there's no Ubuntu Trusty PPA that has it.
  #- LIBMEMCACHED_VERSION='0.53'
  - LIBMEMCACHED_VERSION='1.0.18'

notifications:
  irc:
    channels:
      - "chat.freenode.net#sendapatch"
    on_success: change
    on_failure: change

before_install:
  # Default Travis CI libmemcached is 1.0.18 (Ubuntu Xenial). Need PPAs for
  # other versions.
  #- sh -c "if [ $LIBMEMCACHED_VERSION = '0.53' ] ; then sudo add-apt-repository ppa:???/libmemcached -y; fi"
  - sudo apt-get update -qq
  - sudo apt-get install memcached
  - sudo service memcached start
  - sudo apt-get install libmemcached-dev
  - echo "stats settings" | nc localhost 11211

install: python setup.py install

before_script:
  - sh -c "[ x$LIBMEMCACHED_VERSION = x$(python -c 'import pylibmc; print(pylibmc.libmemcached_version)') ]"
  - pip install nose

script: python bin/runtests.py -v tests --with-doctest

dist: xenial
language: python

python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
  - 3.7
  - 3.8-dev
  - pypy2.7-6.0
  - pypy3.5

env:
  # Would be great to test 0.53 but there's no Ubuntu Trusty PPA that has it.
  #- LIBMEMCACHED_VERSION='0.53'
  - LIBMEMCACHED_VERSION='1.0.18'

notifications:
  irc:
    channels:
      - "chat.freenode.net#sendapatch"
    on_success: change
    on_failure: change

before_install:
  # Default Travis CI libmemcached is 1.0.18 (Ubuntu Xenial). Need PPAs for
  # other versions.
  #- sh -c "if [ $LIBMEMCACHED_VERSION = '0.53' ] ; then sudo add-apt-repository ppa:???/libmemcached -y; fi"
  - sudo apt-get update -qq
  - sudo apt-get install memcached
  - sudo service memcached start
  - sudo apt-get install libmemcached-dev
  - echo "stats settings" | nc localhost 11211

install: python setup.py install

before_script:
  - sh -c "[ x$LIBMEMCACHED_VERSION = x$(python -c 'import pylibmc; print(pylibmc.libmemcached_version)') ]"
  - pip install nose

script: python bin/runtests.py -v tests --with-doctest

Test with pypy2.7-6.0 as well.
Test with pypy2.7-6.0 as well.
