language: python

python:
  - "2.7"
  - "3.4"
  - "3.5"

before_install: 
  #- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
  #    wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
  #    export PATH=/home/travis/miniconda2/bin:$PATH;
  #    export HDF5_DIR=/home/travis/miniconda2/;
  #  else
  #    wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
  #    export PATH=/home/travis/miniconda3/bin:$PATH;
  #    export HDF5_DIR=/home/travis/miniconda3/;
  #  fi
  - wget https://repo.continuum.io/miniconda/Miniconda-3.9.1-Linux-x86_64.sh -O miniconda.sh;
  - export PATH=/home/travis/miniconda/bin:$PATH;
  - export HDF5_DIR=/home/travis/miniconda/;
  - chmod +x miniconda.sh
  - ./miniconda.sh -b
  - conda update --yes conda
  - conda install --yes hdf5
script:  
  - ./test.sh 
after_script:
  - COVERALLS_REPO_TOKEN=GVQTfxG632HknulNqtxFc2zbQBiBTc1MI coveralls
notifications:
  email:
    on_success: change
    on_failure: always

language: python

python:
  - "2.7"
  - "3.4"
  - "3.5"

before_install: 
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
    else
      wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
    fi
  - chmod +x miniconda.sh
  - ./miniconda.sh -b
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      export PATH=/home/travis/miniconda2/bin:$PATH;
      export HDF5_DIR=/home/travis/miniconda2/;
    else
      export PATH=/home/travis/miniconda3/bin:$PATH;
      export HDF5_DIR=/home/travis/miniconda3/;
    fi
  - conda update --yes conda
  - conda install --yes hdf5
script:  
  - ./test.sh 
after_script:
  - COVERALLS_REPO_TOKEN=GVQTfxG632HknulNqtxFc2zbQBiBTc1MI coveralls
notifications:
  email:
    on_success: change
    on_failure: always

Put PATH and HDF_DIR after execution of miniconda.sh
Put PATH and HDF_DIR after execution of miniconda.sh
