-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- dry (stub) runs for each input type - input are empty files - dry run ci test with nf-test
- Loading branch information
1 parent
29a7c8b
commit 237782d
Showing
10 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: dry run CI | ||
|
||
env: | ||
NXF_ANSI_LOG: false | ||
|
||
jobs: | ||
test: | ||
name: Dry run ${{ matrix.inputtype }}-${{ matrix.profile }} pipeline test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
NXF_VER: | ||
- "23.04.1" | ||
- "latest" | ||
inputtype: | ||
- fasta | ||
- illumina | ||
- nanopore | ||
profile: ["docker"] # TODO , "singularity", "conda"] | ||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: /usr/local/bin/nextflow | ||
key: ${{ runner.os }} | ||
restore-keys: | | ||
${{ runner.os }}-nextflow- | ||
- name: Install Nextflow | ||
uses: nf-core/setup-nextflow@v1 | ||
with: | ||
version: "${{ matrix.NXF_VER }}" | ||
|
||
- name: Install nf-test | ||
run: | | ||
wget -qO- https://code.askimed.com/install/nf-test | bash | ||
sudo mv nf-test /usr/local/bin/ | ||
- name: Set up Singularity | ||
if: matrix.profile == 'singularity' | ||
uses: eWaterCycle/setup-singularity@v5 | ||
with: | ||
singularity-version: 3.7.1 | ||
|
||
- name: Set up miniconda | ||
if: matrix.profile == 'conda' | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
channels: conda-forge,bioconda,defaults | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Conda clean | ||
if: matrix.profile == 'conda' | ||
run: conda clean -a | ||
|
||
- name: Run nf-test | ||
run: nf-test test --profile=${{ matrix.profile }} tests/${{ matrix.inputtype }}/*.nf.test --tap=test.tap | ||
|
||
- uses: pcolby/tap-summary@v1 | ||
with: | ||
path: >- | ||
test.tap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ centrifuge-cloud/ | |
conda/ | ||
singularity/ | ||
.vscode/ | ||
.nf-test/ |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
======================================================================================== | ||
Nextflow config file for running tests | ||
======================================================================================== | ||
*/ | ||
params { | ||
// Limit resources so that this can run on GitHub Actions | ||
max_cores = 2 | ||
cores = 1 | ||
max_memory = 6.GB | ||
memory = 6.GB | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
config { | ||
|
||
testsDir "tests" | ||
workDir ".nf-test" | ||
configFile "tests/nextflow.config" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
nextflow_pipeline { | ||
|
||
name "FASTA input" | ||
script "../../clean.nf" | ||
|
||
test("Stub") { | ||
options "-stub-run" | ||
|
||
when { | ||
params { | ||
input_type = "fasta" | ||
input = "$projectDir/assets/EMPTY_FILE" | ||
own = "$projectDir/assets/EMPTY_FILE" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success } | ||
) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
nextflow_pipeline { | ||
|
||
name "Illumina input" | ||
script "../../clean.nf" | ||
|
||
test("Stub paired-end") { | ||
options "-stub-run" | ||
|
||
when { | ||
params { | ||
input_type = "illumina" | ||
input = "$projectDir/assets/EMPTY_FILE_{R1,R2}.fastq" | ||
own = "$projectDir/assets/EMPTY_FILE" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success } | ||
) | ||
} | ||
} | ||
|
||
test("Stub single-end") { | ||
options "-stub-run" | ||
|
||
when { | ||
params { | ||
input_type = "illumina_single_end" | ||
input = "$projectDir/assets/EMPTY_FILE" | ||
own = "$projectDir/assets/EMPTY_FILE" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success } | ||
) | ||
} | ||
} | ||
|
||
test("Stub paired-end bbduk") { | ||
options "-stub-run" | ||
|
||
when { | ||
params { | ||
input_type = "illumina" | ||
input = "$projectDir/assets/EMPTY_FILE_{R1,R2}.fastq" | ||
own = "$projectDir/assets/EMPTY_FILE" | ||
bbduk = true | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success } | ||
) | ||
} | ||
} | ||
|
||
test("Stub single-end bbduk") { | ||
options "-stub-run" | ||
|
||
when { | ||
params { | ||
input_type = "illumina_single_end" | ||
input = "$projectDir/assets/EMPTY_FILE" | ||
own = "$projectDir/assets/EMPTY_FILE" | ||
bbduk = true | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success } | ||
) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
nextflow_pipeline { | ||
|
||
name "Nanopore input" | ||
script "../../clean.nf" | ||
|
||
test("Stub") { | ||
options "-stub-run" | ||
|
||
when { | ||
params { | ||
input_type = "nano" | ||
input = "$projectDir/assets/EMPTY_FILE" | ||
own = "$projectDir/assets/EMPTY_FILE" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success } | ||
) | ||
} | ||
} | ||
|
||
} |