Skip to content

Monorepos

trimtest walks the repository for project markers (a pyproject.toml, package.json, Cargo.toml, go.mod, pubspec.yaml, Package.swift, build.zig, pom.xml, build.gradle*, …) and treats each as a project with its own adapter, runner and baseline.

Terminal window
trimtest detect # which projects were found, and how many tests each tracks
trimtest check # validate trimtest.toml and list what would be detected

A project nested under another is its own project unless it is a workspace member of it: npm, pnpm and yarn workspaces, go.work and replace, uv and PDM workspaces, and Cargo and Gradle or Maven modules. Members are part of their parent, so a change in one member can select tests in another.

A project with no tests runs no commands, so a nested example package does not make a runner fail with “no tests ran”.

trimtest.toml
max_depth = 8 # how deep project markers are searched (default 6)
ignore = ["vendor/**", "examples/**"]
[[project]] # force a project the markers cannot find
kind = "python"
dir = "svc"

Use tests = [globs] to add files that are tests but do not follow the runner’s naming convention, and import_roots = [dirs] for extra Python import roots.

End-to-end suites often depend on code they never import. Map the changed paths to the tests yourself:

[map]
"api/**" = ["web/e2e/**"]
Terminal window
trimtest run --project pytest@api