Skip to content

Commit 25c37d6

Browse files
authored
Merge pull request #265 from nf-core/update-tests
Update tests and relevant GH Actions workflows / actions
2 parents 1c64437 + d423215 commit 25c37d6

File tree

9 files changed

+182
-138
lines changed

9 files changed

+182
-138
lines changed

.github/actions/nf-test/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ runs:
7070
--tap=test.tap \
7171
--shard ${{ inputs.shard }}/${{ inputs.total_shards }}
7272
73-
# Save the absolute path of the test.tap file to the output
74-
echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT
73+
# Save the absolute path of the test.tap file to the output
74+
echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT
7575
7676
- name: Generate test summary
7777
if: always()

.github/workflows/awsfulltest.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
2525
- name: Launch workflow via Seqera Platform
2626
uses: seqeralabs/action-tower-launch@v2
27-
# TODO nf-core: You can customise AWS full pipeline tests as required
28-
# Add full size test data (but still relatively small datasets for few samples)
29-
# on the `test_full.config` test runs with only one set of parameters
3027
with:
3128
workspace_id: ${{ vars.TOWER_WORKSPACE_ID }}
3229
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Run nf-test
2+
on:
3+
pull_request:
4+
paths-ignore:
5+
- "docs/**"
6+
- "**/meta.yml"
7+
- "**/*.md"
8+
- "**/*.png"
9+
- "**/*.svg"
10+
release:
11+
types: [published]
12+
workflow_dispatch:
13+
14+
# Cancel if a newer run is started
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
# NOTE(SW): only run large tests on up-sized instances to avoid wasting compute (in this case the just test profile)
21+
# NOTE(SW): the test profile requires more than 32 GB memory and with the available RunsOn instances, the 32cpu-linux-x64 runner is the best fit despite being excessively overprovisioned re vCPUs
22+
# https://runs-on.com/runners/linux/
23+
# Instance type vCPUs Memory (GiB) RunsOn name
24+
# m7a.medium 1 4 1cpu-linux-x64
25+
# m7i.large 2 8 2cpu-linux-x64
26+
# m7i.xlarge 4 16 4cpu-linux-x64
27+
# c7i.2xlarge 8 16 8cpu-linux-x64
28+
# c7i.4xlarge 16 32 16cpu-linux-x64
29+
# m7i-flex.8xlarge 32 128 32cpu-linux-x64
30+
# c7i.12xlarge 48 96 48cpu-linux-x64
31+
# c7a.16xlarge 64 128 64cpu-linux-x64
32+
nf-test:
33+
uses: ./.github/workflows/nf-test-reusable.yml
34+
strategy:
35+
matrix:
36+
include:
37+
- name: small
38+
tags: cicd
39+
runson_instance_type: 4cpu-linux-x64
40+
runson_volume_size: 60gb
41+
- name: large
42+
tags: cicd.large
43+
runson_instance_type: 32cpu-linux-x64
44+
runson_volume_size: 200gb
45+
with:
46+
name: ${{ matrix.name }}
47+
tags: ${{ matrix.tags }}
48+
runson_instance_type: ${{ matrix.runson_instance_type }}
49+
runson_volume_size: ${{ matrix.runson_volume_size }}
50+
51+
confirm-pass:
52+
needs: [nf-test]
53+
if: always()
54+
runs-on: # use self-hosted runners
55+
- runs-on=${{ github.run_id }}-confirm-pass
56+
- runner=1cpu-linux-x64
57+
steps:
58+
- name: One or more tests failed (excluding latest-everything)
59+
if: ${{ contains(needs.*.result, 'failure') }}
60+
run: exit 1
61+
62+
- name: One or more tests cancelled
63+
if: ${{ contains(needs.*.result, 'cancelled') }}
64+
run: exit 1
65+
66+
- name: All tests ok
67+
if: ${{ contains(needs.*.result, 'success') }}
68+
run: exit 0
69+
70+
- name: debug-print
71+
if: always()
72+
run: |
73+
echo "::group::DEBUG: `needs` Contents"
74+
echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}"
75+
echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"
76+
echo "::endgroup::"

.github/workflows/nf-test.yml renamed to .github/workflows/nf-test-reusable.yml

Lines changed: 26 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
name: Run nf-test
1+
name: Run nf-test on selected test set
22
on:
3-
pull_request:
4-
paths-ignore:
5-
- "docs/**"
6-
- "**/meta.yml"
7-
- "**/*.md"
8-
- "**/*.png"
9-
- "**/*.svg"
10-
release:
11-
types: [published]
12-
workflow_dispatch:
13-
14-
# Cancel if a newer run is started
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17-
cancel-in-progress: true
3+
workflow_call:
4+
inputs:
5+
name:
6+
description: "Name of test set"
7+
type: string
8+
required: true
9+
tags:
10+
description: "Tags to pass as argument for nf-test --tag parameter"
11+
type: string
12+
required: true
13+
runson_instance_type:
14+
description: "RunsOn runner instance type"
15+
type: string
16+
required: true
17+
runson_volume_size:
18+
description: "RunsOn runner instance volume"
19+
type: string
20+
required: true
1821

1922
env:
2023
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
NFT_TAGS: "cicd"
2224
NFT_VER: "0.9.3"
2325
NFT_WORKDIR: "~"
2426
NXF_ANSI_LOG: false
@@ -27,10 +29,10 @@ env:
2729

2830
jobs:
2931
nf-test-changes:
30-
name: nf-test-changes
32+
name: nf-test-changes (${{ inputs.name }})
3133
runs-on: # use self-hosted runners
3234
- runs-on=${{ github.run_id }}-nf-test-changes
33-
- runner=4cpu-linux-x64
35+
- runner=1cpu-linux-x64
3436
outputs:
3537
shard: ${{ steps.set-shards.outputs.shard }}
3638
total_shards: ${{ steps.set-shards.outputs.total_shards }}
@@ -52,21 +54,21 @@ jobs:
5254
NFT_VER: ${{ env.NFT_VER }}
5355
with:
5456
max_shards: 7
55-
tags: ${{ env.NFT_TAGS }}
57+
tags: ${{ inputs.tags }}
5658

5759
- name: debug
5860
run: |
5961
echo ${{ steps.set-shards.outputs.shard }}
6062
echo ${{ steps.set-shards.outputs.total_shards }}
6163
6264
nf-test:
63-
name: "${{ matrix.profile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes.outputs.total_shards }}"
65+
name: " ${{ inputs.name }} tests | ${{ matrix.profile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes.outputs.total_shards }}"
6466
needs: [nf-test-changes]
6567
if: ${{ needs.nf-test-changes.outputs.total_shards != '0' }}
6668
runs-on: # use self-hosted runners
6769
- runs-on=${{ github.run_id }}-nf-test
68-
- runner=4cpu-linux-x64
69-
- disk=large
70+
- runner=${{ inputs.runson_instance_type }}
71+
- volume=${{ inputs.runson_volume_size }}
7072
strategy:
7173
fail-fast: false
7274
matrix:
@@ -103,7 +105,7 @@ jobs:
103105
profile: ${{ matrix.profile }}
104106
shard: ${{ matrix.shard }}
105107
total_shards: ${{ env.TOTAL_SHARDS }}
106-
tags: ${{ env.NFT_TAGS }}
108+
tags: ${{ inputs.tags }}
107109

108110
- name: Report test status
109111
if: ${{ always() }}
@@ -119,30 +121,3 @@ jobs:
119121
exit 1
120122
fi
121123
fi
122-
123-
confirm-pass:
124-
needs: [nf-test]
125-
if: always()
126-
runs-on: # use self-hosted runners
127-
- runs-on=${{ github.run_id }}-confirm-pass
128-
- runner=2cpu-linux-x64
129-
steps:
130-
- name: One or more tests failed (excluding latest-everything)
131-
if: ${{ contains(needs.*.result, 'failure') }}
132-
run: exit 1
133-
134-
- name: One or more tests cancelled
135-
if: ${{ contains(needs.*.result, 'cancelled') }}
136-
run: exit 1
137-
138-
- name: All tests ok
139-
if: ${{ contains(needs.*.result, 'success') }}
140-
run: exit 0
141-
142-
- name: debug-print
143-
if: always()
144-
run: |
145-
echo "::group::DEBUG: `needs` Contents"
146-
echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}"
147-
echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"
148-
echo "::endgroup::"

.nf-core.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ template:
1515
lint:
1616
actions_ci: false
1717
files_exist:
18+
- .github/workflows/nf-test.yml
1819
- lib/Utils.groovy
1920
- lib/WorkflowMain.groovy
2021
- lib/WorkflowOncoanalyser.groovy

conf/test_full.config

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@
1010
----------------------------------------------------------------------------------------
1111
*/
1212

13-
process {
14-
withName: 'PURPLE' {
15-
ext.args = '-min_purity 1 -max_purity 1 -min_ploidy 2 -max_ploidy 2'
16-
}
17-
}
18-
1913
params {
2014
config_profile_name = 'Full test profile'
2115
config_profile_description = 'Full test dataset to check pipeline function'
2216

2317
// Input data for full size test
24-
input = params.pipelines_testdata_base_path + '/samplesheet/fastq_eval.subject_a.wgts.tndna_trna.minimal.csv'
18+
input = params.pipelines_testdata_base_path + '/samplesheet/full_size.hcc1395.wgts.tndna_trna.fastq.csv'
2519

2620
// Analysis config
2721
mode = 'wgts'

tests/default.nf.test.snap

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@
2121
"subject_a/amber",
2222
"subject_a/amber/placeholder",
2323
"subject_a/bamtools",
24-
"subject_a/bamtools/subject_a_subject_a.normal_bamtools",
25-
"subject_a/bamtools/subject_a_subject_a.normal_bamtools/subject_a.normal.bam_metric.coverage.tsv",
26-
"subject_a/bamtools/subject_a_subject_a.normal_bamtools/subject_a.normal.bam_metric.flag_counts.tsv",
27-
"subject_a/bamtools/subject_a_subject_a.normal_bamtools/subject_a.normal.bam_metric.frag_length.tsv",
28-
"subject_a/bamtools/subject_a_subject_a.normal_bamtools/subject_a.normal.bam_metric.partition_stats.tsv",
29-
"subject_a/bamtools/subject_a_subject_a.normal_bamtools/subject_a.normal.bam_metric.summary.tsv",
30-
"subject_a/bamtools/subject_a_subject_a.tumor_bamtools",
31-
"subject_a/bamtools/subject_a_subject_a.tumor_bamtools/subject_a.tumor.bam_metric.coverage.tsv",
32-
"subject_a/bamtools/subject_a_subject_a.tumor_bamtools/subject_a.tumor.bam_metric.flag_counts.tsv",
33-
"subject_a/bamtools/subject_a_subject_a.tumor_bamtools/subject_a.tumor.bam_metric.frag_length.tsv",
34-
"subject_a/bamtools/subject_a_subject_a.tumor_bamtools/subject_a.tumor.bam_metric.partition_stats.tsv",
35-
"subject_a/bamtools/subject_a_subject_a.tumor_bamtools/subject_a.tumor.bam_metric.summary.tsv",
24+
"subject_a/bamtools/subject_a.normal",
25+
"subject_a/bamtools/subject_a.normal/subject_a.normal.bam_metric.coverage.tsv",
26+
"subject_a/bamtools/subject_a.normal/subject_a.normal.bam_metric.flag_counts.tsv",
27+
"subject_a/bamtools/subject_a.normal/subject_a.normal.bam_metric.frag_length.tsv",
28+
"subject_a/bamtools/subject_a.normal/subject_a.normal.bam_metric.partition_stats.tsv",
29+
"subject_a/bamtools/subject_a.normal/subject_a.normal.bam_metric.summary.tsv",
30+
"subject_a/bamtools/subject_a.tumor",
31+
"subject_a/bamtools/subject_a.tumor/subject_a.tumor.bam_metric.coverage.tsv",
32+
"subject_a/bamtools/subject_a.tumor/subject_a.tumor.bam_metric.flag_counts.tsv",
33+
"subject_a/bamtools/subject_a.tumor/subject_a.tumor.bam_metric.frag_length.tsv",
34+
"subject_a/bamtools/subject_a.tumor/subject_a.tumor.bam_metric.partition_stats.tsv",
35+
"subject_a/bamtools/subject_a.tumor/subject_a.tumor.bam_metric.summary.tsv",
3636
"subject_a/chord",
3737
"subject_a/chord/subject_a.tumor.chord.mutation_contexts.tsv",
3838
"subject_a/chord/subject_a.tumor.chord.prediction.tsv",
3939
"subject_a/cider",
40+
"subject_a/cider/subject_a.tumor.cider.alignment_match.tsv.gz",
4041
"subject_a/cider/subject_a.tumor.cider.bam",
41-
"subject_a/cider/subject_a.tumor.cider.blastn_match.tsv.gz",
4242
"subject_a/cider/subject_a.tumor.cider.layout.gz",
4343
"subject_a/cider/subject_a.tumor.cider.locus_stats.tsv",
4444
"subject_a/cider/subject_a.tumor.cider.vdj.tsv.gz",
45+
"subject_a/cider/subject_a.tumor_rna.cider.alignment_match.tsv.gz",
4546
"subject_a/cider/subject_a.tumor_rna.cider.bam",
46-
"subject_a/cider/subject_a.tumor_rna.cider.blastn_match.tsv.gz",
4747
"subject_a/cider/subject_a.tumor_rna.cider.layout.gz",
4848
"subject_a/cider/subject_a.tumor_rna.cider.locus_stats.tsv",
4949
"subject_a/cider/subject_a.tumor_rna.cider.vdj.tsv.gz",
@@ -277,6 +277,23 @@
277277
"subject_a/purple/subject_a.tumor.purple.somatic.vcf.gz",
278278
"subject_a/purple/subject_a.tumor.purple.sv.germline.vcf.gz",
279279
"subject_a/purple/subject_a.tumor.purple.sv.vcf.gz",
280+
"subject_a/sage",
281+
"subject_a/sage/germline",
282+
"subject_a/sage/germline/subject_a.normal.gene.coverage.tsv",
283+
"subject_a/sage/germline/subject_a.normal.sage.bqr.png",
284+
"subject_a/sage/germline/subject_a.normal.sage.bqr.tsv",
285+
"subject_a/sage/germline/subject_a.tumor.sage.bqr.png",
286+
"subject_a/sage/germline/subject_a.tumor.sage.bqr.tsv",
287+
"subject_a/sage/germline/subject_a.tumor.sage.germline.vcf.gz",
288+
"subject_a/sage/germline/subject_a.tumor.sage.germline.vcf.gz.tbi",
289+
"subject_a/sage/somatic",
290+
"subject_a/sage/somatic/subject_a.normal.sage.bqr.png",
291+
"subject_a/sage/somatic/subject_a.normal.sage.bqr.tsv",
292+
"subject_a/sage/somatic/subject_a.tumor.gene.coverage.tsv",
293+
"subject_a/sage/somatic/subject_a.tumor.sage.bqr.png",
294+
"subject_a/sage/somatic/subject_a.tumor.sage.bqr.tsv",
295+
"subject_a/sage/somatic/subject_a.tumor.sage.somatic.vcf.gz",
296+
"subject_a/sage/somatic/subject_a.tumor.sage.somatic.vcf.gz.tbi",
280297
"subject_a/sage_append",
281298
"subject_a/sage_append/germline",
282299
"subject_a/sage_append/germline/subject_a.normal.frag_lengths.tsv.gz",
@@ -288,23 +305,6 @@
288305
"subject_a/sage_append/somatic/subject_a.tumor.sage.append.vcf.gz",
289306
"subject_a/sage_append/somatic/subject_a.tumor.sage.append.vcf.gz.tbi",
290307
"subject_a/sage_append/somatic/subject_a.tumor_query.sage.bqr.tsv",
291-
"subject_a/sage_calling",
292-
"subject_a/sage_calling/germline",
293-
"subject_a/sage_calling/germline/subject_a.normal.gene.coverage.tsv",
294-
"subject_a/sage_calling/germline/subject_a.normal.sage.bqr.png",
295-
"subject_a/sage_calling/germline/subject_a.normal.sage.bqr.tsv",
296-
"subject_a/sage_calling/germline/subject_a.tumor.sage.bqr.png",
297-
"subject_a/sage_calling/germline/subject_a.tumor.sage.bqr.tsv",
298-
"subject_a/sage_calling/germline/subject_a.tumor.sage.germline.vcf.gz",
299-
"subject_a/sage_calling/germline/subject_a.tumor.sage.germline.vcf.gz.tbi",
300-
"subject_a/sage_calling/somatic",
301-
"subject_a/sage_calling/somatic/subject_a.normal.sage.bqr.png",
302-
"subject_a/sage_calling/somatic/subject_a.normal.sage.bqr.tsv",
303-
"subject_a/sage_calling/somatic/subject_a.tumor.gene.coverage.tsv",
304-
"subject_a/sage_calling/somatic/subject_a.tumor.sage.bqr.png",
305-
"subject_a/sage_calling/somatic/subject_a.tumor.sage.bqr.tsv",
306-
"subject_a/sage_calling/somatic/subject_a.tumor.sage.somatic.vcf.gz",
307-
"subject_a/sage_calling/somatic/subject_a.tumor.sage.somatic.vcf.gz.tbi",
308308
"subject_a/sigs",
309309
"subject_a/sigs/placeholder",
310310
"subject_a/teal",
@@ -323,9 +323,9 @@
323323
]
324324
],
325325
"meta": {
326-
"nf-test": "0.9.2",
327-
"nextflow": "25.04.6"
326+
"nf-test": "0.9.3",
327+
"nextflow": "25.10.2"
328328
},
329-
"timestamp": "2025-08-12T16:05:52.737409"
329+
"timestamp": "2025-12-03T04:25:08.751931146"
330330
}
331331
}

tests/profile_test.nf.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ nextflow_pipeline {
33
name "Test pipeline"
44
script "../main.nf"
55
tag "pipeline"
6+
tag "cicd.large"
67

78
profile "test"
89

0 commit comments

Comments
 (0)