Context
main.nf and the modules under modules/local/ (Dorado basecall/duplex/demux, samtools BAM↔FASTQ, etc.) currently have no automated tests. Regressions are only caught by running a real delivery end-to-end through AWS Batch, which is slow and consumes GPU spot capacity.
Came out of PR #23 review while tightening the head-container entrypoint — once the Python side has pytest, the Nextflow side is the remaining untested surface.
Scope
Adopt nf-test and add coverage for:
- Per-process tests for the local modules (
BASECALL_POD_5_SIMPLEX, BASECALL_POD_5_DUPLEX, DEMUX_POD_5, BAM_TO_FASTQ, MERGE_BAMS). Stub Dorado/samtools where needed so tests don't require GPUs — the goal is to validate channel wiring and output file shape, not re-test the binaries themselves.
- Workflow-level test for
main.nf with a small fixture POD5 (or a stub upstream channel) covering both the demux=true and demux=false branches, asserting the published raw/ layout matches what seq_import.samplesheet.generate_samplesheet expects to find.
- Config sanity check —
nextflow config main.nf -profile batch already runs in docker-build.yml; the nf-test suite supersedes that as the deeper check.
Out of scope
- Real GPU runs against Dorado — those stay manual / batch-driven.
- Testing the AWS Batch executor wiring (
-profile batch) — nf-test runs locally; profile coverage would need a separate integration harness.
Wiring
- Add an nf-test config + fixture directory (convention is
tests/ at repo root, or tests/<module> colocated).
- Run
nf-test test from a GitHub Actions workflow on PRs. Survey mgs-orchestrator / det-read-scrubber first to see whether either has an nf-test CI pattern worth borrowing before standing up a new one.
Context
main.nfand the modules undermodules/local/(Dorado basecall/duplex/demux, samtools BAM↔FASTQ, etc.) currently have no automated tests. Regressions are only caught by running a real delivery end-to-end through AWS Batch, which is slow and consumes GPU spot capacity.Came out of PR #23 review while tightening the head-container entrypoint — once the Python side has pytest, the Nextflow side is the remaining untested surface.
Scope
Adopt nf-test and add coverage for:
BASECALL_POD_5_SIMPLEX,BASECALL_POD_5_DUPLEX,DEMUX_POD_5,BAM_TO_FASTQ,MERGE_BAMS). Stub Dorado/samtools where needed so tests don't require GPUs — the goal is to validate channel wiring and output file shape, not re-test the binaries themselves.main.nfwith a small fixture POD5 (or a stub upstream channel) covering both thedemux=trueanddemux=falsebranches, asserting the publishedraw/layout matches whatseq_import.samplesheet.generate_samplesheetexpects to find.nextflow config main.nf -profile batchalready runs indocker-build.yml; the nf-test suite supersedes that as the deeper check.Out of scope
-profile batch) — nf-test runs locally; profile coverage would need a separate integration harness.Wiring
tests/at repo root, ortests/<module>colocated).nf-test testfrom a GitHub Actions workflow on PRs. Survey mgs-orchestrator / det-read-scrubber first to see whether either has an nf-test CI pattern worth borrowing before standing up a new one.