summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 2fcf69ee576815ec2750bbc90c0eb7113b1b9461 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
language: python

python:
  - "2.6"
  - "2.7"
  - "3.2"
  - "3.3"

env:
  - UNCERTAINTIES="N" NUMPY_VERSION=0
  - UNCERTAINTIES="N" NUMPY_VERSION=1.6
  - UNCERTAINTIES="N" NUMPY_VERSION=1.7
  - UNCERTAINTIES="N" NUMPY_VERSION=1.8
  - UNCERTAINTIES="Y" NUMPY_VERSION=0
  - UNCERTAINTIES="Y" NUMPY_VERSION=1.6
  - UNCERTAINTIES="Y" NUMPY_VERSION=1.7
  - UNCERTAINTIES="Y" NUMPY_VERSION=1.8

branches:
  only:
    - master
    - develop

# Setup anaconda
before_install:
  - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
  - chmod +x miniconda.sh
  - ./miniconda.sh -b
  - export PATH=/home/travis/miniconda/bin:$PATH
  - conda update --yes conda

  # The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
  - sudo rm -rf /dev/shm
  - sudo ln -s /run/shm /dev/shm

install:
  - conda create --yes -n env_name python=$TRAVIS_PYTHON_VERSION pip
  - source activate env_name
  - if [ $TRAVIS_PYTHON_VERSION == '2.6' ]; then pip install unittest2; fi
  - if [ $UNCERTAINTIES == 'Y' ]; then pip install uncertainties; fi
  - if [ $NUMPY_VERSION != '0' ]; then conda install --yes numpy==$NUMPY_VERSION; fi
  - pip install coverage coveralls

script:
  - coverage run -p --source=pint --omit="*test*","*compat*" setup.py test
  - coverage combine
  - coverage report -m

after_script:
  - coveralls --verbose

matrix:
  # Don't run with these version combinations as these NumPy packages don't seem to be installable with Travis
  exclude:
    - python: "3.2"
      env: UNCERTAINTIES="N" NUMPY_VERSION=1.6
    - python: "3.2"
      env: UNCERTAINTIES="Y" NUMPY_VERSION=1.6
    - python: "3.3"
      env: UNCERTAINTIES="N" NUMPY_VERSION=1.6
    - python: "3.3"
      env: UNCERTAINTIES="Y" NUMPY_VERSION=1.6