Repository navigation
Conversation
Use pytest-split to deal the tests round-robin into 16 groups, plus one group for the download tests, which need Apptainer. Without a durations file every test counts the same, which spreads each file's slow tests over all groups. New test files are picked up automatically. Also let setup-uv install Python instead of a separate setup-python step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhDtLdb3HSoES4BFJRnUzw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhDtLdb3HSoES4BFJRnUzw
Codecov Report❌ Patch coverage is
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhDtLdb3HSoES4BFJRnUzw
`git checkout subworkflows` fails with "could be both a local file and a tracking branch" when the checked-out branch has a subworkflows/ directory and there is no local 'subworkflows' branch yet. Pass "--" so git always treats the argument as a revision. This showed up in CI once tests from different files shared a worker, and so the same cached clone of the modules-test repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhDtLdb3HSoES4BFJRnUzw
Merging this PR will improve performance by 39.4%3 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes |
The "Python tests" workflow starts one job per test file: 94 jobs on PRs, and 188 on pushes to
dev. Each job spends about 30 s on setup plus about a minute waiting for a runner, and many test files take less time than that to run.This PR runs the tests in 16 groups instead, using pytest-split, plus one
downloadgroup for the tests that need Apptainer.Timings
dev(PR run)Both columns are single runs.
devis this PR run; other recentdevPR runs took 9.4–11 min. The new wall time is limited by the slowest group, which is about 6 min of tests.How it works
PYTEST_SPLITS, and a smallGet test groupsjob turns it into the job matrix.setup-uvnow installs Python, so the separatesetup-pythonstep is gone.Bug fix found along the way
Two tests failed on the first run with
Branch 'subworkflows' not found in 'https://gitlab.com/nf-core/modules-test.git'. This is an existing bug inSyncedRepo.checkout().git checkout subworkflowsrefuses to run if the branch currently checked out has asubworkflows/folder ("could be both a local file and a tracking branch").--, so git always reads the argument as a branch or commit. It can affect users too, so it has its own changelog entry.Why no durations file?
pytest-split can balance groups using a committed file of per-test durations. That file goes stale as tests change. I simulated both approaches with the per-test timings from the latest
devrun:Other details
snapshot_report.html. Previously that depended on the job's test file name.MATRIX_TESTis now the group name.SyncedRepo.checkout(), so whichever PR merges second will need a small rebase.Before merging: job names change from
Run <file> with …toRun tests (group N) with …. Any required status checks that name the old jobs need updating.Split out of #4629.
PR checklist
CHANGELOG.mdis updateddocsis updated (n/a)🤖 Generated with Claude Code
https://claude.ai/code/session_01MhDtLdb3HSoES4BFJRnUzw