Skip to main content

bactopia-test

Run the nf-test profile matrix for Bactopia components.

Each component is tested against docker, conda, singularity_galaxy, and singularity_pull. Docker validates (or generates) the snapshot; the other profiles validate against it so runtime drift is surfaced without rewriting any tests. Environments are pre-built serially before the parallel test phase. Per-profile logs and work directories are kept under logs/.

Usage

bactopia-test [OPTIONS]

Required Options

OptionTypeDefaultDescription
--bactopia-pathSTRINGDirectory where the Bactopia repository is stored
--test-dataSTRINGDirectory containing bactopia-tests data (sets BACTOPIA_TESTS env). Required unless --cleanup

Cleanup

OptionTypeDefaultDescription
--cleanupBOOLfalseRemove .nf-test/ temp files under modules/subworkflows/workflows/tests, then exit (no tests run)
--dry-runBOOLfalseWith --cleanup, list what would be removed without deleting

Test Selection

OptionTypeDefaultDescription
--tierCHOICE (modules, subworkflows, workflows, all)allWhich component tier to test
--includeSTRINGComma-separated list of component names to include
--excludeSTRINGComma-separated list of component names to exclude

Execution Options

OptionTypeDefaultDescription
--cachedirSTRING/home/runner/.bactopiaCache directory holding conda/ and singularity/ subdirectories for pre-built environments
--generateBOOLfalseForce regeneration of the docker snapshot (otherwise the committed snapshot is validated; a missing snapshot is always generated)
--force-rebuildBOOLfalseForce a rebuild of existing Conda environments and Singularity images
--max-retryINT3Maximum build retries per environment during the build phase
--jobsINT32Number of components tested in parallel (profiles within a component run sequentially). Tune to the test host; the default 32 suits a large box
--fail-fastBOOLfalseStop on the first component with any failing profile instead of continuing
--timeoutINT90Per-run timeout in minutes. Each nf-test subprocess is killed after this duration. Set to 0 to disable
--timesSTRINGPath to test-times baseline JSON (expected_seconds per component). Default: {bactopia-path}/conf/test-times.json. Enables per-component timeouts and longest-first ordering.
-tm, --timeout-multiplierINTRANGE4Per-component timeout = min(expected_seconds * this, --timeout). Only applied when a test-times file is available.

Output Options

OptionTypeDefaultDescription
--outdirSTRING.Directory to write the logs/ folder into
--jsonBOOLfalseOutput results as JSON

Additional Options

OptionTypeDefaultDescription
--verboseBOOLfalsePrint debug related text
--silentBOOLfalseOnly critical errors will be printed
--version, -VBOOLfalseShow the version and exit.