Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci confirm pass #7186

Merged
merged 7 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@ jobs:
needs: [nf-test-gpu]
if: always()
steps:
- name: All tests ok
if: ${{ success() || !contains(needs.*.result, 'failure') }}
run: exit 0
- name: One or more tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

- name: One or more tests cancelled
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1

- name: All tests ok
if: ${{ contains(needs.*.result, 'success') }}
run: exit 0
Comment on lines +119 to +121
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sateeshperi This will now pass if any test passes with a success status. That's why it negated the presence of a 'failure' status before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

negated the presence of which failure status ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.* is not for any single test. It is for all members of 'needs' which has only one element here so it just stands for 'nf'test-gpu'.
Secondly, if any test fails, the fail branch will be triggered first as it is now placed above the pass branch.
I created this new confirm-pass in methylseq and we tested it quite a bit with multiple runs where tests were passing, failing, being skipped, etc.


- name: debug-print
if: always()
run: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,18 @@ jobs:
needs: [nf-test]
if: always()
steps:
- name: All tests ok
if: ${{ success() || !contains(needs.*.result, 'failure') }}
run: exit 0
- name: One or more tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

- name: One or more tests cancelled
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1

- name: All tests ok
if: ${{ contains(needs.*.result, 'success') }}
run: exit 0

- name: debug-print
if: always()
run: |
Expand Down
1 change: 0 additions & 1 deletion modules/nf-core/bwameth/align/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,4 @@ nextflow_process {
)
}
}

}
14 changes: 8 additions & 6 deletions modules/nf-core/parabricks/fq2bammeth/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ process PARABRICKS_FQ2BAMMETH {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads"
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads"
def known_sites_command = known_sites ? known_sites.collect{"--knownSites $it"}.join(' ') : ""
def known_sites_output = known_sites ? "--out-recal-file ${prefix}.table" : ""
def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : ''
def known_sites_output = known_sites ? "--out-recal-file ${prefix}.table" : ""
def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : ''
"""
ln -sf \$(readlink $fasta) $index/$fasta

pbrun \\
fq2bam_meth \\
--ref $index/$fasta \\
Expand All @@ -44,6 +45,7 @@ process PARABRICKS_FQ2BAMMETH {
$known_sites_output \\
$num_gpus \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' )
Expand All @@ -55,11 +57,11 @@ process PARABRICKS_FQ2BAMMETH {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam
touch ${prefix}.bam.bai

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' )
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ nextflow_process {
process "PARABRICKS_FQ2BAMMETH"
config "./nextflow.config"

tag "gpu"
tag "bwameth/index"
tag "modules"
tag "parabricks"
tag "parabricks/fq2bammeth"
tag "modules_nfcore"
tag "gpu"

setup {
run("BWAMETH_INDEX") {
Expand All @@ -26,8 +26,7 @@ nextflow_process {
}
}


test("SRR389222 - fastq - se") {
test("SRR389222 single-end [fastq]") {

when {
process {
Expand Down Expand Up @@ -60,7 +59,7 @@ nextflow_process {
}
}

test("SRR389222 - fastq - se - stub") {
test("SRR389222 single-end [fastq] - stub") {
options '-stub'

when {
Expand Down Expand Up @@ -90,7 +89,7 @@ nextflow_process {
}
}

test("E. coli - fastq - pe - stub") {
test("E.coli paired-end [fastq] - stub") {
options '-stub'

when {
Expand Down
32 changes: 16 additions & 16 deletions modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"SRR389222 - fastq - se - stub": {
"SRR389222 single-end [fastq] - stub": {
"content": [
{
"0": [
Expand All @@ -21,13 +21,13 @@
]
],
"2": [

],
"3": [

],
"4": [

],
"5": [
"versions.yml:md5,882d996a64ad457fcaf85e3a75514baf"
Expand All @@ -51,13 +51,13 @@
]
],
"bqsr_table": [

],
"duplicate_metrics": [

],
"qc_metrics": [

],
"versions": [
"versions.yml:md5,882d996a64ad457fcaf85e3a75514baf"
Expand All @@ -70,7 +70,7 @@
},
"timestamp": "2024-11-12T11:20:10.809580487"
},
"E. coli - fastq - pe - stub": {
"E.coli paired-end [fastq] - stub": {
"content": [
{
"0": [
Expand All @@ -92,13 +92,13 @@
]
],
"2": [

],
"3": [

],
"4": [

],
"5": [
"versions.yml:md5,882d996a64ad457fcaf85e3a75514baf"
Expand All @@ -122,13 +122,13 @@
]
],
"bqsr_table": [

],
"duplicate_metrics": [

],
"qc_metrics": [

],
"versions": [
"versions.yml:md5,882d996a64ad457fcaf85e3a75514baf"
Expand All @@ -141,7 +141,7 @@
},
"timestamp": "2024-11-12T11:20:18.927598721"
},
"SRR389222 - fastq - se": {
"SRR389222 single-end [fastq]": {
"content": [
"a7f7ca7b5eb503ab58790d64a0273ed6",
[
Expand All @@ -163,4 +163,4 @@
},
"timestamp": "2024-10-26T21:29:14.709022"
}
}
}
Loading