ci(cli): run the CLI test suite in CI - #331
Open
V3RON wants to merge 3 commits into
Open
Conversation
packages/cli had no test script, so `pnpm turbo run typecheck build lint test --affected` silently skipped its suite in CI (turbo reports rozenite#test -> <NONEXISTENT>). Add the same `vitest --run --passWithNoTests` script used by sibling packages; turbo.json's existing generic test task (dependsOn ^build, build) already builds workspace deps first, so no turbo.json changes needed.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
packages/clihad notestscript, sopnpm turbo run typecheck build lint test --affectedin CI resolved its test task to nothing (rozenite#test -> <NONEXISTENT>) and its 10 test files never ran.This adds the missing script and fixes the six stale expectations that had accumulated behind the gap:
config-wrapper.test.ts—427c1515(feat(cli): add 'enabled' when wrapping config (#108)) intentionally started emitting{ enabled: process.env.WITH_ROZENITE === 'true' }, and touched only the implementation.agent-command-output.test.ts—7b00844e(fix: align agent websocket origin (#307)) changedDEFAULT_AGENT_HOSTfromlocalhostto127.0.0.1, updatingpackages/middleware's tests but not this one.In both cases the implementation is correct and the test was stale, so the expectations were updated rather than the code.
Related Issue
Closes #330
Context
The stale-test fixes come first, as separate commits, so the suite is green before it is switched on — otherwise this lands a red build.
turbo.jsonneeds no change: its generictesttask already declaresdependsOn: ["^build", "build"], the same dependency shapetypecheckneeds to build workspace deps first.Worth landing before #322, which adds a substantial number of CLI tests that would otherwise also not run.
Two notes for the reviewer:
@rozenite/agent-bridge#test, which has a real test file CI has never executed. Those are left for a follow-up rather than widened into this PR.Testing
npx turbo run typecheck lint test --forceacross the whole repo: 100 successful, 100 total, withrozenite#testnow present and passing 73 tests across 10 files.npx turbo run test --filter=rozenite --dry=jsonreportsrozenite#test -> vitest --run --passWithNoTestsinstead of<NONEXISTENT>.git show --staton the two originating commits, to confirm the implementation was intentional and the test was simply never updated.