annotate .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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
1 language: python
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
2 python:
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
3 - 2.7
5368
904d7cd19d67 Set up travis to run python 3.4 across code as well. Do not fail the
John Rouillard <rouilj@ieee.org>
parents: 5259
diff changeset
4 - 3.4
904d7cd19d67 Set up travis to run python 3.4 across code as well. Do not fail the
John Rouillard <rouilj@ieee.org>
parents: 5259
diff changeset
5
904d7cd19d67 Set up travis to run python 3.4 across code as well. Do not fail the
John Rouillard <rouilj@ieee.org>
parents: 5259
diff changeset
6 matrix:
904d7cd19d67 Set up travis to run python 3.4 across code as well. Do not fail the
John Rouillard <rouilj@ieee.org>
parents: 5259
diff changeset
7 allow_failures:
904d7cd19d67 Set up travis to run python 3.4 across code as well. Do not fail the
John Rouillard <rouilj@ieee.org>
parents: 5259
diff changeset
8 - python: 3.4
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
9
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
10 sudo: false
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
11
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
12 addons:
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
13 apt:
5375
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
14 sources:
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
15 - sourceline: ppa:xapian-backports/ppa
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
16
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
17 packages:
5375
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
18 # Required to build/install the xapian-binding
5373
faf3f01ef446 Run into a roadblock with trying to install python 3 compatible
John Rouillard <rouilj@ieee.org>
parents: 5372
diff changeset
19 - libxapian-dev
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
20 # Required to install pyme
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
21 - libgpgme11-dev
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
22 - swig
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
23
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
24 before_install:
5375
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
25 # Sphinx required to build the xapian python bindings
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
26 - pip install sphinx
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
27 - XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1)
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
28 - cd /tmp
5375
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
29 - curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
30 - tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
31 - cd xapian-bindings-$XAPIAN_VER/
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
32 - if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python; fi
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
33 - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3; fi
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
34 - make && make install
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
35
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
36 # change back to the checked out repository directory
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
37 - cd $TRAVIS_BUILD_DIR
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
38
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
39 install:
5099
a7cf77108e97 issue2550636 instal whosh as part of travis ci to try to get indexer testing working
John Rouillard <rouilj@ieee.org>
parents: 5060
diff changeset
40 - pip install MySQL-python psycopg2 pytz pyme whoosh
5060
de420f34d696 Add codecov support to TravisCI
John Kristensen <john@jerrykan.com>
parents: 5059
diff changeset
41 - pip install pytest-cov codecov
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
42
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
43 before_script:
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
44 # set up mysql database
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
45 - mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";'
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
46
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
47 # set up postgresql database
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
48 - psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
49
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
50 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
51 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
52 - sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
53
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
54 script:
5060
de420f34d696 Add codecov support to TravisCI
John Kristensen <john@jerrykan.com>
parents: 5059
diff changeset
55 - py.test -v test/ --cov=roundup
de420f34d696 Add codecov support to TravisCI
John Kristensen <john@jerrykan.com>
parents: 5059
diff changeset
56
de420f34d696 Add codecov support to TravisCI
John Kristensen <john@jerrykan.com>
parents: 5059
diff changeset
57 after_success:
de420f34d696 Add codecov support to TravisCI
John Kristensen <john@jerrykan.com>
parents: 5059
diff changeset
58 - codecov

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