view .travis.yml @ 5466:09966de4d3f6

Python 3 built-in types can't be compared against None
author Christof Meerwald <cmeerw@cmeerw.org>
date Sat, 28 Jul 2018 20:34:31 +0100
parents 1ad46057ae4a
children 17eea0eac04e
line wrap: on
line source

language: python
python:
  - 2.7
  - 3.4

matrix:
  allow_failures:
    - python: 3.4

sudo: false

addons:
  apt:
    sources:
      - sourceline: ppa:xapian-backports/ppa

    packages:
      # Required to build/install the xapian-binding
      - libxapian-dev
      # Required to install pyme
      - libgpgme11-dev
      - swig

before_install:
  # Sphinx required to build the xapian python bindings
  - pip install sphinx
  - XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1)
  - cd /tmp
  - curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz
  - tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz
  - cd xapian-bindings-$XAPIAN_VER/
  - if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python; fi
  - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3; fi
  - make && make install

  # change back to the checked out repository directory
  - cd $TRAVIS_BUILD_DIR

install:
  - pip install MySQL-python psycopg2 pytz pyme whoosh
  - pip install pytest-cov codecov

before_script:
  # set up mysql database
  - mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";'

  # set up postgresql database
  - psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres

  # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
  #   needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
  - sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py

script:
  - py.test -v test/ --cov=roundup

after_success:
  - codecov

Roundup Issue Tracker: http://roundup-tracker.org/