Skip to content

Commit

Permalink
[FIX] separate freesurfer-related process testing to a separate actio…
Browse files Browse the repository at this point in the history
…n run to avoid memory issues
  • Loading branch information
gagnonanthony committed Nov 19, 2024
1 parent 8ea6bd5 commit 45ee20c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 51 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- "docker"
- "singularity"
test_name:
- "test"
- "main.nf.test"
- "freesurfer.nf.test"
isMaster:
- ${{ github.base_ref == 'master' }}
# Exclude conda and singularity on dev
Expand Down Expand Up @@ -76,4 +77,4 @@ jobs:

- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
run: |
nf-test test ${GITHUB_WORKSPACE} --profile ${{ matrix.profile }}
nf-test test ${GITHUB_WORKSPACE}/tests/${{ matrix.test_name }} --profile ${{ matrix.profile }}
29 changes: 29 additions & 0 deletions tests/freesurfer.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
nextflow_pipeline {

options "-stub-run"

name "Test nf-pediatric freesurfer workflows main.nf"
script "../main.nf"

test("Freesurfer profile - should run successfully") {

when {
params {

params.input = "$projectDir/tests/data/samplesheet_testtracking.csv"
params.outdir = "test_results/"

params.freesurfer = true
params.fs_license = "https://www.dropbox.com/scl/fi/0s8lp6lydyd0rxawxb4jm/license.txt?rlkey=hz54oc0d4sor69avqphtrjvgn&st=9e0yij97&dl=0"

}
}

then {
assert workflow.success
assert workflow.trace.tasks().size() == 3
}

}

}
51 changes: 2 additions & 49 deletions tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -271,61 +271,16 @@ nextflow_pipeline {

}

test("Freesurfer profile - should run successfully") {
test("Connectomics + tracking profiles - should run successfully") {

when {
params {

params.input = "$projectDir/tests/data/samplesheet_testtracking.csv"
params.outdir = "test_results/"

params.freesurfer = true
params.fs_license = "https://www.dropbox.com/scl/fi/0s8lp6lydyd0rxawxb4jm/license.txt?rlkey=hz54oc0d4sor69avqphtrjvgn&st=9e0yij97&dl=0"

}
}

then {
assert workflow.success
assert workflow.trace.tasks().size() == 3
}

}

test("Freesurfer + connectomics profiles - should run successfully") {

when {
params {

params.input = "$projectDir/tests/data/samplesheet_testconn.csv"
params.outdir = "test_results/"

params.freesurfer = true
params.connectomics = true
params.fs_license = "https://www.dropbox.com/scl/fi/0s8lp6lydyd0rxawxb4jm/license.txt?rlkey=hz54oc0d4sor69avqphtrjvgn&st=9e0yij97&dl=0"

}
}

then {
assert workflow.success
assert workflow.trace.tasks().size() == 9
}

}

test("Freesurfer + connectomics + tracking profiles - should run successfully") {

when {
params {

params.input = "$projectDir/tests/data/samplesheet_testtracking.csv"
params.outdir = "test_results/"

params.freesurfer = true
params.connectomics = true
params.tracking = true
params.fs_license = "https://www.dropbox.com/scl/fi/0s8lp6lydyd0rxawxb4jm/license.txt?rlkey=hz54oc0d4sor69avqphtrjvgn&st=9e0yij97&dl=0"

}
}
Expand All @@ -337,18 +292,16 @@ nextflow_pipeline {

}

test("Freesurfer + connectomics + tracking profiles with additional metrics - should run successfully") {
test("Connectomics + tracking profiles with additional metrics - should run successfully") {

when {
params {

params.input = "$projectDir/tests/data/samplesheet_testtracking_withmetrics.csv"
params.outdir = "test_results/"

params.freesurfer = true
params.connectomics = true
params.tracking = true
params.fs_license = "https://www.dropbox.com/scl/fi/0s8lp6lydyd0rxawxb4jm/license.txt?rlkey=hz54oc0d4sor69avqphtrjvgn&st=9e0yij97&dl=0"

}
}
Expand Down

0 comments on commit 45ee20c

Please sign in to comment.