sudo: required

language: java

jdk: openjdk8

services:
  - docker

install:
  - mkdir /tmp/nextflow
  - cd /tmp/nextflow
  - wget -qO- get.nextflow.io | bash
  - sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
  - cd ${TRAVIS_BUILD_DIR}/tests/

env:
  - CLFLAGS=""       # Basic run
  - CLFLAGS="-r"     # Run, RRBS mode
  - CLFLAGS="-n"     # Run, no-trimming mode
  # Commented out until I figure out how to handle multiple docker images nicely
  # - CLFLAGS="-p"     # BWAmeth use existing ref genome
  # - CLFLAGS="-p -b"  # BWAmeth run, build reference genome

script:
  - "./run_test.sh -b $CLFLAGS" # Run, build reference genome
  - "./run_test.sh $CLFLAGS"

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}

env:
  - CLFLAGS=""       # Basic run
  - CLFLAGS="-r"     # Run, RRBS mode
  - CLFLAGS="-n"     # Run, no-trimming mode
  # Commented out until I figure out how to handle multiple docker images nicely
  # - CLFLAGS="-p"     # BWAmeth use existing ref genome
  # - CLFLAGS="-p -b"  # BWAmeth run, build reference genome

script:
  - "nf-core lint ${TRAVIS_BUILD_DIR}"
  - "cd ${TRAVIS_BUILD_DIR}/tests && ./run_test.sh -b $CLFLAGS" # Run, build reference genome
  - "cd ${TRAVIS_BUILD_DIR}/tests && ./run_test.sh $CLFLAGS"

Add nf-core testing to Travis config
Add nf-core testing to Travis config
