/*
* -------------------------------------------------
*  Nextflow config file for running tests
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
*   nextflow run nf-core/neutronstar -profile test
*/

params {
  full_output = true
  name = "testrun"
  test = true
  busco_data = "busco_example"
}

// The fake supernova doesn't work with trace enabled. I don't know why.
timeline { enabled = false }
report { enabled = false }
trace { enabled = false }
dag { enabled = false }

process {
    executor = 'local'
    cpus = { 2 }
    memory = { 4.GB }
    time = { 1.h * task.attempt }
    errorStrategy = { task.exitStatus == 143 ? 'retry' : 'finish' }
    maxRetries = 0
    maxErrors = '-1'
    validExitStatus = [0,127]
    withName: busco {
        beforeScript = "cd $baseDir/data; python busco_data.py download test; cd -"
    }
    withName: supernova_mkoutput {
        container = "nfcore/supernova:2.1.1"
    }
    withName: supernova_full {
      beforeScript = "export PATH=$baseDir/tests/:$PATH"
      container = null
    }
    withName: supernova {
      container = null
    }


}
