Skip to content

Commit

Permalink
starting to add test
Browse files Browse the repository at this point in the history
  • Loading branch information
toniher committed Oct 25, 2024
1 parent 6bfdb02 commit ae4c976
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
16 changes: 14 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ params {
}

process {
queue = 'long-sl7,short-sl7'

// queue = 'long-sl7,short-sl7'
cache = 'lenient'
memory='4.5G'
cpus='1'
time='6h'
scratch = false
containerOptions = { workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g)': null}
// containerOptions = { workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g)': null}
container = 'perl:5.24-threaded-buster'

withLabel: incr_time_cpus {
Expand Down Expand Up @@ -176,6 +177,17 @@ profiles {
shifter.enabled = false
charliecloud.enabled = false
}
// Default configuration for test - Change accordingly
test {
apptainer.enabled = true
apptainer.autoMounts = true
conda.enabled = false
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}

// Original ExOrthist AWS Batch configuration
// awsbatch {
Expand Down
8 changes: 8 additions & 0 deletions nf-test.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config {

testsDir "tests"
workDir ".nf-test"
configFile "tests/nextflow.config"
profile "test"

}
20 changes: 20 additions & 0 deletions tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
nextflow_pipeline {

name "Test pipeline with default settings"
script "../main.nf"

test("Params: default") {

when {
params {
output = "$output"
}
}

then {
assertAll(
{ assert workflow.success }
)
}
}
}
27 changes: 27 additions & 0 deletions tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

/*
========================================================================================
Nextflow config file for running tests
========================================================================================
*/


// Impose sensible resource limits for testing
// process {
// withName: '.*' {
// cpus = 2
// memory = 3.GB
// time = 2.h
// }
// }

// Impose same minimum Nextflow version as the pipeline for testing
manifest {
nextflowVersion = '!>=24.04.2'
}

// Disable all Nextflow reporting options
timeline { enabled = false }
report { enabled = false }
trace { enabled = false }
dag { enabled = false }

0 comments on commit ae4c976

Please sign in to comment.