From ddbca7b467b8f84b05d376bfcf7ff2c32e2588a5 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Tue, 2 Feb 2021 11:55:41 -0600 Subject: [PATCH] test: Use profile ENV variable hack The user will now set the env variable and pass it to pytest. You also can't set the env variable ahead of time, it has to be run with pytest. Example: PROFILE=conda pytest --tag fastqc --symlink --kwd --- tests/config/nextflow.config | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index 4149feea..9af14ccf 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -1,20 +1,15 @@ - params { outdir = "output/" publish_dir_mode = "copy" enable_conda = false } -profiles { - conda { - params.enable_conda = true - } - docker { - docker.enabled = true - docker.runOptions = '-u \$(id -u):\$(id -g)' - } - singularity { - singularity.enabled = true - singularity.autoMounts = true - } +if("$PROFILE" == "docker") { + docker.enabled = true + docker.runOptions = '-u \$(id -u):\$(id -g)' +} else if ("$PROFILE" == "singularity") { + singularity.enabled = true + singularity.autoMounts = true +} else if ("$PROFILE" == "conda") { + params.enable_conda = true }