From f06790c3dec3eb4a8aea62b3290361ffae33375b Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 13 Oct 2023 10:45:36 +0200 Subject: [PATCH 1/6] add pipeline level tests --- conf/test.config | 2 +- tests/main.nf.test | 27 +++++++++++++++++++++++++++ tests/sra_ids_test.csv | 7 +++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/main.nf.test create mode 100644 tests/sra_ids_test.csv diff --git a/conf/test.config b/conf/test.config index cb77f578..67291b47 100644 --- a/conf/test.config +++ b/conf/test.config @@ -20,7 +20,7 @@ params { max_time = '6.h' // Input data - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/fetchngs/sra_ids_test.csv' + input = 'tests/sra_ids_test.csv' validationSchemaIgnoreParams = 'test_data_base,merge_samplesheet_ids,fastq_ftp_ids,test_data' } diff --git a/tests/main.nf.test b/tests/main.nf.test new file mode 100644 index 00000000..7bf19f34 --- /dev/null +++ b/tests/main.nf.test @@ -0,0 +1,27 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + + test("Run with profile test") { + + when { + params { + outdir = "results" + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = "$projectDir/tests/sra_ids_test.csv" + validationSchemaIgnoreParams = 'test_data_base,merge_samplesheet_ids,fastq_ftp_ids,test_data' + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + +} diff --git a/tests/sra_ids_test.csv b/tests/sra_ids_test.csv new file mode 100644 index 00000000..ec8b5cc9 --- /dev/null +++ b/tests/sra_ids_test.csv @@ -0,0 +1,7 @@ +SRR9984183 +SRR13191702 +ERR1160846 +SRR12848126 +SRR14593545 +SRR14709033 +GSE214215 From 6f94f654f3568a93a4dc319bb8e620cca1c50a9e Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 13 Oct 2023 11:07:14 +0200 Subject: [PATCH 2/6] add tags --- tests/tags.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/tags.yml diff --git a/tests/tags.yml b/tests/tags.yml new file mode 100644 index 00000000..3a1868da --- /dev/null +++ b/tests/tags.yml @@ -0,0 +1,4 @@ +pipeline_fetchngs: + - **.nf + - **.config + - **.nf.test From e9917d81b017d73d7c929ff6fcbadeff3aec018b Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 13 Oct 2023 11:17:19 +0200 Subject: [PATCH 3/6] update tags --- tests/tags.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tags.yml b/tests/tags.yml index 3a1868da..5b091f8e 100644 --- a/tests/tags.yml +++ b/tests/tags.yml @@ -1,4 +1,4 @@ pipeline_fetchngs: - - **.nf - - **.config - - **.nf.test + - "**.nf" + - "**.config" + - "**.nf.test" From 91d59aa6251cb68a695d48901ee5e6fb4e72acad Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 13 Oct 2023 11:37:48 +0200 Subject: [PATCH 4/6] use proper tag --- tests/main.nf.test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/main.nf.test b/tests/main.nf.test index 7bf19f34..ac05aea9 100644 --- a/tests/main.nf.test +++ b/tests/main.nf.test @@ -3,6 +3,7 @@ nextflow_pipeline { name "Test pipeline" script "../main.nf" tag "pipeline" + tag "pipeline_fetchngs" test("Run with profile test") { From 796728a52184426ba3c8a5761d16a8b7b321b5ae Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 13 Oct 2023 11:38:44 +0200 Subject: [PATCH 5/6] extends files to trigger test --- tests/tags.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tags.yml b/tests/tags.yml index 5b091f8e..80e5fd75 100644 --- a/tests/tags.yml +++ b/tests/tags.yml @@ -2,3 +2,4 @@ pipeline_fetchngs: - "**.nf" - "**.config" - "**.nf.test" + - "**.json" From 8b6570b3a1cf7575721f51dead316b591c66d7e5 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Fri, 13 Oct 2023 12:23:23 +0200 Subject: [PATCH 6/6] Update conf/test.config Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- conf/test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/test.config b/conf/test.config index 67291b47..c09a571c 100644 --- a/conf/test.config +++ b/conf/test.config @@ -20,7 +20,7 @@ params { max_time = '6.h' // Input data - input = 'tests/sra_ids_test.csv' + input = '${projectDir}/tests/sra_ids_test.csv' validationSchemaIgnoreParams = 'test_data_base,merge_samplesheet_ids,fastq_ftp_ids,test_data' }