# Config file for automatic testing at travis-ci.org
language: python
python: 2.7
cache: apt
addons:
    apt:
        packages:
            - git
            - libatlas-dev
            - libatlas-base-dev
            - liblapack-dev
            - gfortran

before_install:
    - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
    - bash miniconda.sh -b -p "$HOME/miniconda"
    - export PATH="$HOME/miniconda/bin:$PATH"
    - export NUMPY=19
    - conda update --yes conda
    - conda install --yes --quiet conda-build jinja2 toolz anaconda-client
    - conda install --yes --quiet pep8 pylint
    - git clone https://github.com/alexandrucoman/bcbio-dev-conda build
    - if [ "$TRAVIS_BRANCH" == "develop" ]; then
        python build/build.py --bcbio-repo "$BCBIO_REPO" --upload --token "$BINSTAR_TOKEN" --numpy "$NUMPY";
      else
        python build/build.py --bcbio-repo "$BCBIO_REPO" --bcbio-branch "$TRAVIS_BRANCH" --numpy "$NUMPY";
      fi
    - export PACKAGE=$(conda build --output build/bcbio-nextgen-vm --numpy "$NUMPY")

install:
  - conda install --yes "$PACKAGE"

script:
  - pylint --rcfile=pylintrc bcbiovm
  - pep8 --config=pep8 bcbiovm

# Config file for automatic testing at travis-ci.org
language: python
python: 2.7
cache: apt
addons:
    apt:
        packages:
            - git
            - libatlas-dev
            - libatlas-base-dev
            - liblapack-dev
            - gfortran

before_install:
    - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
    - bash miniconda.sh -b -p "$HOME/miniconda"
    - export PATH="$HOME/miniconda/bin:$PATH"
    - export NUMPY=19
    - conda update --yes conda
    - conda install --yes --quiet conda-build jinja2 toolz anaconda-client
    - git clone https://github.com/alexandrucoman/bcbio-dev-conda build
    - if [ "$TRAVIS_BRANCH" == "develop" ]; then
        python build/build.py --bcbio-repo "$BCBIO_REPO" --upload --token "$BINSTAR_TOKEN" --numpy "$NUMPY";
      else
        python build/build.py --bcbio-repo "$BCBIO_REPO" --bcbio-branch "$TRAVIS_BRANCH" --numpy "$NUMPY";
      fi
    - export PACKAGE=$(conda build --output build/bcbio-nextgen-vm --numpy "$NUMPY")
    - source activate _test
    - conda install --yes --quiet pep8 pylint

install:
  - conda install --yes --quiet "$PACKAGE"

script:
  - pylint --rcfile=pylintrc bcbiovm
  - pep8 --config=pep8 bcbiovm

Use the test environment for testing the package
Use the test environment for testing the package

conda install "$PACKAGE" does not install dependencies so in order
to avoid a hack all the style checks and tests will be runned in
the _test environment created by conda build.
