Skip to content

test: move tests into their packages and run them per package - #133

Draft
userAugustos wants to merge 23 commits into
build/turborepo-monorepofrom
test/move-tests-into-packages
Draft

userAugustos wants to merge 23 commits into
build/turborepo-monorepofrom
test/move-tests-into-packages

Conversation

@userAugustos

@userAugustos userAugustos commented Sep 17, 2026

Copy link
Copy Markdown

Closes #126. Stacked on #130: the base of this PR is the #130 branch, so the diff shows only this change.

Summary

  • Each package owns its tests. Five CLI tests move to packages/cli/tests. Twenty-six core tests move to packages/core/tests. The root tests/ keeps the end-to-end harness: run_tests.sh, README.md, test_integration.py, test_performance.py.
  • Each package declares pytest in its own dev group. That is what makes Turborepo synthesize one test task per package. pytest leaves the root dev group, and the root task becomes an explicit command over tests/ only.
  • bun run test runs the three tasks. bun run test --filter=canyonos or --filter=canyonos-core runs one package. A package task caches and only reruns when that package or its own dependency closure changes.
  • One test changes content: the path line in test_otel_exporter_fanout.py that the move forced. run_tests.sh also runs the package suites.

Test

  • uv sync from a clean checkout installs pytest and both packages.
  • bun run test: canyonos 65 passed, canyonos-python 10 passed, canyonos-core 167 collected with the 11 known errors.
  • bun run test --filter=canyonos runs only the CLI tests and hits the cache on a second run.
  • bun run check passes.

Review Focus

  • turbo.json: the root test task runs pytest tests with inputs: ["tests/**"], so a change under packages/ does not rerun it.
  • The split of test files by import (canyonos vs canyonos_core).
  • tests/run_tests.sh line that runs the unit suites before the live deployment.

Known and accepted

CLI tests live in packages/cli/tests and core tests in packages/core/tests.
Each package declares pytest, so turbo runs one test task per package and
a filter runs a single package. The root tests directory keeps the
end-to-end harness with its own task.
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Keep the core tests out of the image build context.
…kages

The three test files new on main land in the package they exercise:
test_canyonos_build.py and test_canyonos_env.py under packages/cli,
test_local_controller_readiness.py under packages/core. The root suite
keeps only the end-to-end harness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant