ci: run the existing test suite on push and PR - #103
Open
hozantaher wants to merge 2 commits into
Open
Conversation
The test passed (diff, repoPath) but the function takes (repoPath) only, and without OPENROUTER_API_KEY it silently asserted against the callClaudeCode fallback instead of the mocked fetch.
The suite of 92 test files had no workflow running it; only publish.yml existed.
This was referenced Jul 28, 2026
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.
The repo has 92 test files and
vitest.config.ts, but.github/workflows/only containspublish.yml— nothing runs them. Pull requests therefore land with no checks at all (#102 is currently sitting at zero).This adds a
Testworkflow mirroring the conventions already inpublish.yml(macos-latest,pnpm/action-setup@v4, Node 22.14.0 with pnpm cache,--frozen-lockfile) and runningpnpm typecheckthenpnpm test. The e2e specs gate themselves behindDMUX_E2E=1and stay skipped, since they drive a real tmux server.One test had to be fixed first
mainis not currently green.__tests__/integration/gitOperations.test.tscalls:but the function takes a single argument (
src/utils/aiMerge.ts:150), which is how production callers use it (mergePopup.tsx:117,commitMessageHandler.ts:25). The first argument was being used asrepoPath.The assertion also never reached the mocked
fetch:callOpenRouterreturnsnullwhenOPENROUTER_API_KEYis unset (aiMerge.ts:36-37), so the flow fell through tocallClaudeCode, whoseexecSyncis mocked in that file — the test was asserting against'[main abc123] Test commit'. The fix passes the real signature and sets a dummy key around the call so the OpenRouter branch is actually exercised, restoring the previous value afterwards.Verified locally:
109 passed | 1 skipped, 652 tests,pnpm typecheckclean.Unrelated finding
src/components/panes/MergePane.tsx:143callsgenerateCommitMessage()with no argument at all, sorepoPathisundefined. Left alone here to keep this PR reviewable — happy to file it separately.