-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from fmalmeida/dev
Hotfix: v2.7.1
- Loading branch information
Showing
12 changed files
with
199 additions
and
22 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,77 @@ | ||
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | ||
name: nf-test CI | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
release: | ||
types: [published] | ||
merge_group: | ||
types: | ||
- checks_requested | ||
branches: | ||
- master | ||
- dev | ||
|
||
env: | ||
NXF_ANSI_LOG: false | ||
NFTEST_VER: "0.8.1" | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: "NF: ${{ matrix.NXF_VER }}" | ||
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'fmalmeida/ngs-preprocess') }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
NXF_VER: | ||
- "23.04.0" | ||
|
||
steps: | ||
- name: Disk space cleanup | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
|
||
- name: Check out pipeline code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- name: Install Nextflow | ||
uses: nf-core/setup-nextflow@v1 | ||
with: | ||
version: "${{ matrix.NXF_VER }}" | ||
|
||
- name: Cache nf-test installation | ||
id: cache-software | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
/usr/local/bin/nf-test | ||
/home/runner/.nf-test/nf-test.jar | ||
key: ${{ runner.os }}-${{ env.NFTEST_VER }}-nftest | ||
|
||
- name: Install nf-test | ||
if: steps.cache-software.outputs.cache-hit != 'true' | ||
run: | | ||
wget -qO- https://code.askimed.com/install/nf-test | bash | ||
sudo mv nf-test /usr/local/bin/ | ||
- name: Run nf-test | ||
run: | | ||
nf-test test tests/main.nf.test --junitxml=test.xml | ||
- name: Output log on failure | ||
if: failure() | ||
run: | | ||
sudo apt install bat > /dev/null | ||
batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/tests/*/meta/nextflow.log | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: test.xml |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ teste | |
testing | ||
.vscode/settings.json | ||
docs/_build | ||
*.log | ||
.nf-test/ |
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
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
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
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
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
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
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,8 @@ | ||
config { | ||
|
||
testsDir "tests" | ||
workDir ".nf-test" | ||
configFile "tests/nextflow.config" | ||
profile "docker" | ||
|
||
} |
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,39 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test Workflow main.nf" | ||
script "main.nf" | ||
|
||
test("Testing workflow - Should run without fails") { | ||
|
||
when { | ||
params { | ||
sra_ids = 'https://github.com/fmalmeida/test_datasets/raw/main/sra_ids.txt' | ||
output = "${outputDir}/test_output" | ||
max_cpus = 2 | ||
max_memory = '6.GB' | ||
max_time = '6.h' | ||
} | ||
} | ||
|
||
then { | ||
|
||
assertAll( | ||
// All good? | ||
{assert workflow.success}, | ||
|
||
// All there? | ||
{assert path("${outputDir}/test_output").list().size() == 5}, | ||
{assert path("${outputDir}/test_output/preprocessing_outputs").list().size() == 3}, | ||
|
||
// Check if files are the same | ||
{assert snapshot( | ||
workflow.trace, | ||
path( "${outputDir}/test_output/final_output" ) | ||
).match()} | ||
) | ||
|
||
} | ||
|
||
} | ||
|
||
} |
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,29 @@ | ||
{ | ||
"Testing workflow - Should run without fails": { | ||
"content": [ | ||
{ | ||
"tasksFailed": 0, | ||
"tasksCount": 16, | ||
"tasksSucceeded": 16 | ||
}, | ||
[ | ||
[ | ||
"SRR19901041.filtered.fq.gz:md5,1d7a8e18db3b1f7ac0bfc1f5cf1daddf" | ||
], | ||
[ | ||
"ERR7339227.filtered.fq.gz:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"SRR9641620.filtered.fq.gz:md5,f6658663be49766459b123efa690cc42" | ||
], | ||
[ | ||
"ERR9850226_R1.preprocessed.fq.gz:md5,69f8bd550fbf99d81f4a110734f4803a", | ||
"ERR9850226_R2.preprocessed.fq.gz:md5,7543436f1614ae814337a9b123d26376" | ||
] | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-05-10T15:44:14.430345179" | ||
} | ||
} |
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,5 @@ | ||
/* | ||
======================================================================================== | ||
Nextflow config file for running tests | ||
======================================================================================== | ||
*/ |