sudo: required
language: java
jdk: openjdk8
services:
  - docker
python:
  - "2.7"
cache: pip
matrix:
  fast_finish: true

install:
  # Install Nextflow
  - mkdir /tmp/nextflow
  - cd /tmp/nextflow
  - wget -qO- get.nextflow.io | bash
  - sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
  # Install nf-core/tools
  - git clone https://github.com/nf-core/tools.git /tmp/nf-core-tools
  - cd /tmp/nf-core-tools
  - pip install --user -e .
  # Reset
  - cd ${TRAVIS_BUILD_DIR}/tests

env:
  - ALIGNER=bismark NXF_VER=0.27.6
  - ALIGNER=bismark
  - ALIGNER=bwameth NXF_VER=0.27.6
  - ALIGNER=bwameth

script:
  - "nf-core lint ${TRAVIS_BUILD_DIR}"
  - "./run_test.sh -a $ALIGNER -b" # Run, build reference genome
  - "./run_test.sh -a $ALIGNER"    # Basic run
  - "./run_test.sh -a $ALIGNER -r" # Run, RRBS mode
  - "./run_test.sh -a $ALIGNER -n" # Run, no-trimming mode
