Skip to content

Commit

Permalink
Merge pull request #80 from nf-core/pytest-workflow
Browse files Browse the repository at this point in the history
Pytest-workflow
  • Loading branch information
drpatelh authored Nov 24, 2020
2 parents 751204e + 83539fc commit 794a5cb
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 678 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/fastqc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ jobs:
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: python -m pip install --upgrade pip pytest-workflow

# Test the module
- run: nextflow run ./software/fastqc/test/ -profile docker
- run: pytest --tag fastqc --symlink --wt 2
1 change: 0 additions & 1 deletion software/fastqc/test/deprecated/lib

This file was deleted.

76 changes: 0 additions & 76 deletions software/fastqc/test/deprecated/main.nf

This file was deleted.

1 change: 0 additions & 1 deletion software/fastqc/test/input/test_R1.fastq.gz

This file was deleted.

1 change: 0 additions & 1 deletion software/fastqc/test/input/test_R2.fastq.gz

This file was deleted.

1 change: 0 additions & 1 deletion software/fastqc/test/input/test_single_end.fastq.gz

This file was deleted.

36 changes: 0 additions & 36 deletions software/fastqc/test/main.nf

This file was deleted.

187 changes: 0 additions & 187 deletions software/fastqc/test/output/test_paired_end/test_1_fastqc.html

This file was deleted.

Binary file not shown.
187 changes: 0 additions & 187 deletions software/fastqc/test/output/test_paired_end/test_2_fastqc.html

This file was deleted.

Binary file not shown.
187 changes: 0 additions & 187 deletions software/fastqc/test/output/test_single_end/test_fastqc.html

This file was deleted.

Binary file not shown.
File renamed without changes.
31 changes: 31 additions & 0 deletions tests/software/fastqc/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2

include { FASTQC as FASTQC_SE } from '../../../software/fastqc/main.nf' addParams( options: [ publish_dir:'test_single_end' ] )
include { FASTQC as FASTQC_PE } from '../../../software/fastqc/main.nf' addParams( options: [ publish_dir:'test_paired_end' ] )

/*
* Test with single-end data
*/
workflow test_single_end {

def input = []
input = [ [ id:'test', single_end:true ], // meta map
[ file("${launchDir}/tests/data/fastq/rna/test_single_end.fastq.gz", checkIfExists: true) ] ]

FASTQC_SE ( input )
}

/*
* Test with paired-end data
*/
workflow test_paired_end {

def input = []
input = [ [ id:'test', single_end:false ], // meta map
[ file("${launchDir}/tests/data/fastq/rna/test_R1.fastq.gz", checkIfExists: true),
file("${launchDir}/tests/data/fastq/rna/test_R2.fastq.gz", checkIfExists: true) ] ]

FASTQC_PE ( input )
}
20 changes: 20 additions & 0 deletions tests/software/fastqc/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- name: Run fastqc single-end test workflow
command: nextflow run ./tests/software/fastqc/ -profile docker -entry test_single_end -c tests/config/nextflow.config
tags:
- fastqc
files:
- path: output/test_single_end/test_fastqc.html
md5sum: 7027e72c3e55292c1567f12e02565e3b
- path: output/test_single_end/test_fastqc.zip

- name: Run fastqc paired-end test workflow
command: nextflow run ./tests/software/fastqc/ -profile docker -entry test_paired_end -c tests/config/nextflow.config
tags:
- fastqc
files:
- path: output/test_paired_end/test_1_fastqc.html
md5sum: b3796b4323dc34970b7461f813135254
- path: output/test_paired_end/test_2_fastqc.html
md5sum: 55182467f48ca5ed88a2608ea57a1afc
- path: output/test_paired_end/test_1_fastqc.zip
- path: output/test_paired_end/test_2_fastqc.zip

0 comments on commit 794a5cb

Please sign in to comment.