summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: a318a20ca13b569b137e33c00f7c2549b2a4b7b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# http://travis-ci.org/#!/RDFLib/rdflib
language: python
branches:
  only:
    - master

python:
    # - 2.5
    - 2.6
    - 2.7
    # - 3.2
    - 3.3
    - 3.4
    # - "pypy"

before_install:
    - bash .travis.fuseki_install_optional.sh

install:
    # iodate0.4.8 is problematic with Pypy, use fixed version
    - if [[ $TRAVIS_PYTHON_VERSION == '2.5' ]]; then pip install --default-timeout 60 ordereddict; pip install --default-timeout 60 "simplejson"; pip install --default-timeout 60 "elementtree"; pip install --default-timeout 60 "html5lib==0.95"; fi
    - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --default-timeout 60 ordereddict; fi
    - if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then pip install --default-timeout 60 -r requirements.py2.txt;  pip install --default-timeout 60 "html5lib";fi
    - if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then pip install --default-timeout 60 -r requirements.py3.txt; fi
    - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install --upgrade "https://bitbucket.org/gjhiggins/isodate/downloads/isodate-0.4.8.tar.gz"; pip install --default-timeout 60 "elementtree"; fi
    - if [[ $TRAVIS_PYTHON_VERSION != '2.5' ]]; then pip install --default-timeout 60 coverage coveralls nose-timer networkx && export HAS_COVERALLS=1; fi
    - python setup.py install

before_script:
    - if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then flake8 --exclude=pyRdfa,extras,host,transform,rdfs,sparql,results,pyMicrodata --exit-zero rdflib; fi

script:
    # Must run the tests in build/src so python3 doesn't get confused and run
    # the python2 code from the current directory instead of the installed
    # 2to3 version in build/src.
    - if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=rdflib ; fi
    - if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=build/src/rdflib --where=./build/src; fi

after_success:
    - if [[ $HAS_COVERALLS ]] ; then coveralls ; fi

notifications:
    irc:
        channels: "chat.freenode.net#rdflib"