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
This commit is contained in:
Edmund Miller 2021-02-02 11:55:41 -06:00
parent e7b1241449
commit ddbca7b467
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D

View file

@ -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
}