Skip to content

Commit

Permalink
Merge branch 'dev' into fresh-nf-test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse authored Oct 23, 2024
2 parents 245d355 + 100258d commit acb7cb9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-pdiff

- name: Set up pdiff to see diff between nf-test snapshots
run: |
python -m pip install --upgrade pip
pip install pdiff cryptography
- name: Install pdiff
run: python -m pip install --upgrade pip pdiff cryptography

- name: Set up Miniconda
- name: Set up miniconda
if: matrix.profile == 'conda'
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
with:
Expand Down
10 changes: 9 additions & 1 deletion nf-test.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
config {
// location for all nf-tests
testsDir "."
workDir ".nf-test"

// nf-test directory including temporary files for each test
workDir System.getenv("NFT_WORKDIR") ?: ".nf-test"

// location of an optional nextflow.config file specific for executing tests
configFile "conf/test.config"

// run all test with defined profile(s) from the main nextflow.config
profile "test"
triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'conf/test_full.config'

// Include plugins
plugins {
load "[email protected]"
load "[email protected]"
Expand Down
4 changes: 3 additions & 1 deletion tests/default.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ nextflow_pipeline {

name "Test pipeline"
script "../main.nf"
tag "pipeline"
tag "pipeline_sarek"

test("Run with profile test") {

Expand Down Expand Up @@ -50,7 +52,7 @@ nextflow_pipeline {
then {
assertAll(
{ assert workflow.failed},
{ assert workflow.stderr.contains("* -- Entry 2 - sample: Sample ID must be provided and cannot contain spaces (test 2)") }
{ assert workflow.stderr.toString().contains("Sample ID must be provided and cannot contain spaces") }
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/default.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,4 @@
},
"timestamp": "2024-10-08T12:09:25.505363"
}
}
}

0 comments on commit acb7cb9

Please sign in to comment.