Skip to content

Commit 528d27f

Browse files
authored
Merge pull request #169 from LUMC/nextflowfunctional
Functional tests for nextflow
2 parents 73d90e3 + fa894a0 commit 528d27f

File tree

2 files changed

+44
-36
lines changed

2 files changed

+44
-36
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,38 +60,45 @@ jobs:
6060
- name: Upload coverage report
6161
uses: codecov/codecov-action@v1
6262

63-
test-functional:
63+
test-functional-python-tools:
6464
runs-on: ubuntu-latest
65-
needs: lint
6665
strategy:
6766
matrix:
6867
python-version: ["3.7"]
69-
test-program: [cromwell, snakemake, miniwdl]
68+
test-program: [snakemake, miniwdl]
7069
steps:
7170
- uses: actions/[email protected]
7271

73-
# Setup python program requirements
7472
- name: Set up Python ${{ matrix.python-version }}
75-
if: ${{ matrix.test-program != 'cromwell' }}
7673
uses: actions/setup-python@v2
7774
with:
7875
python-version: ${{ matrix.python-version }}
7976
- name: Install tox
80-
if: ${{ matrix.test-program != 'cromwell' }}
8177
run: pip install tox
8278

83-
# Setup cromwell requirements
79+
- name: Test
80+
shell: bash -l {0} # Needed for conda
81+
run: tox -e ${{ matrix.test-program }}
82+
83+
test-functional-other:
84+
runs-on: ubuntu-latest
85+
strategy:
86+
matrix:
87+
test-program: [ cromwell, nextflow ]
88+
steps:
89+
- uses: actions/[email protected]
90+
8491
- name: Install conda
85-
if: ${{ matrix.test-program == 'cromwell' }}
8692
uses: conda-incubator/[email protected] # https://github.com/conda-incubator/setup-miniconda.
8793
with:
88-
channels: conda-forge,defaults
89-
- name: Install cromwell and tox
94+
channels: conda-forge,bioconda,defaults
95+
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
96+
channel-priority: true
97+
98+
- name: Install test program and tox
9099
shell: bash -l {0} # Needed for conda
91-
if: ${{ matrix.test-program == 'cromwell' }}
92-
run: conda install cromwell tox
100+
run: mamba install ${{ matrix.test-program }} tox
93101

94-
# Test
95102
- name: Test
96103
shell: bash -l {0} # Needed for conda
97-
run: tox -e ${{ matrix.test-program }}
104+
run: tox -e ${{ matrix.test-program }}

tests/pipelines/nextflow/nextflow_testpipeline.nf

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
#!/usr/bin/env nextflow
22

3-
# Copyright (C) 2018 Leiden University Medical Center
4-
# This file is part of pytest-workflow
5-
#
6-
# pytest-workflow is free software: you can redistribute it and/or modify
7-
# it under the terms of the GNU Affero General Public License as
8-
# published by the Free Software Foundation, either version 3 of the
9-
# License, or (at your option) any later version.
10-
#
11-
# pytest-workflow is distributed in the hope that it will be useful,
12-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-
# GNU Affero General Public License for more details.
15-
#
16-
# You should have received a copy of the GNU Affero General Public License
17-
# along with pytest-workflow. If not, see <https://www.gnu.org/licenses/
3+
/* Copyright (C) 2018 Leiden University Medical Center
4+
This file is part of pytest-workflow
185
19-
# Nextflow using the Snakemake test file as example.
20-
# Just a simple dummy pipeline that reads some data from /dev/urandom,
21-
# and does some transformations on it.
6+
pytest-workflow is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU Affero General Public License as
8+
published by the Free Software Foundation, either version 3 of the
9+
License, or (at your option) any later version.
10+
11+
pytest-workflow is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU Affero General Public License for more details.
15+
16+
You should have received a copy of the GNU Affero General Public License
17+
along with pytest-workflow. If not, see <https://www.gnu.org/licenses/
18+
*/
19+
20+
/* Nextflow using the Snakemake test file as example.
21+
Just a simple dummy pipeline that reads some data from /dev/urandom,
22+
and does some transformations on it. */
2223

2324
params.N_LINES_TO_READ = 5
2425

2526
process read_random {
2627
publishDir = [
27-
path: { "${params.outdir}/rand'}
28+
path: { "${params.outdir}/rand" }
2829
]
2930

3031
input:
@@ -40,7 +41,7 @@ process read_random {
4041

4142
process base64_random {
4243
publishDir = [
43-
path: { "${params.outdir}/b64'}
44+
path: { "${params.outdir}/b64" }
4445
]
4546

4647
input:
@@ -57,7 +58,7 @@ process base64_random {
5758

5859
process gzip_b64 {
5960
publishDir = [
60-
path: { "${params.outdir}/randgz'}
61+
path: { "${params.outdir}/randgz" }
6162
]
6263

6364
input:
@@ -73,7 +74,7 @@ process gzip_b64 {
7374

7475
process concat_gzip {
7576
publishDir = [
76-
path: { "${params.outdir}'}
77+
path: { "${params.outdir}" }
7778
]
7879

7980
input:

0 commit comments

Comments
 (0)