view .travis.yml @ 5416:56c9bcdea47f

Python 3 preparation: unicode. This patch introduces roundup/anypy/strings.py, which has a comment explaining the string representations generally used and common functions to handle the required conversions. Places in the code that explicitly reference the "unicode" type / built-in function are generally changed to use the new functions (or, in a few places where those new functions don't seem to fit well, other approaches such as references to type(u'') or use of the codecs module). This patch does not generally attempt to address text conversions in any places not currently referencing the "unicode" type (although scripts/import_sf.py is made to use binary I/O in places as fixing the "unicode" reference didn't seem coherent otherwise).
author Joseph Myers <jsm@polyomino.org.uk>
date Wed, 25 Jul 2018 09:05:58 +0000
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/