Reenable NPM integration tests#10623
Conversation
|
Size Change: -2 B (0%) Total Size: 17.8 MB ℹ️ View Unchanged
|
f4d97af to
1482085
Compare
20cae13 to
000c980
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request reverts the temporary removal of NPM integration tests and includes a fix to make them work in the GitHub Actions environment by forcing the CI environment variable to false. The changes look good and correctly address the issue with interactive tests in CI. I have one suggestion to improve the CI workflow's reliability.
bobcatfish
left a comment
There was a problem hiding this comment.
Tried to dig up more info on this and found some interesting things but not a lot of concrete sources XD
https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true/ <-- github actions is doing this on purpose, tho there's very little information there
the AI summaries for my searches assert repeatedly that CI=true will change npm behavior but sources are hard to come by, https://stackoverflow.com/questions/62473327/how-does-ci-true-affect-the-npm-install-command seems like the best
I'm wondering if CI=true is such a standard that github actions is asserting it by default, if we're going to have other side effects we don't want from explicitly disabling this 🤔 some of the failures on this PR seem like they could be related:
FAIL file-system-interactive.test.ts > Interactive file system > should perform a read-then-write sequence
AssertionError: CLI did not start up in interactive mode correctly: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ file-system-interactive.test.ts:45:9
43| isReady,
44| 'CLI did not start up in interactive mode correctly',
45| ).toBe(true);
| ^
46|
47| // Step 1: Read the file
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
| @@ -835,6 +835,10 @@ export class TestRig { | |||
| ) as { [key: string]: string }, | |||
| }; | |||
|
|
|||
| // Force CI off since it breaks rendering in github actions | |||
| // https://github.com/google-gemini/gemini-cli/issues/10517 | |||
| options.env!['CI'] = 'false'; | |||
|
Yeah. I actually deleted my request in the chat for a reviewer since I saw these errors :( Investigating now. |
|
oh! i do! hooray! |

TLDR
Reverts #10520 along with a one line fix that makes interactive integration tests work.
Dive Deeper
Github sets a
CI=trueenvironment variable. For reasons I still don't understand, this breaks the interactive tests whenINTEGRATION_TEST_USE_INSTALLED_GEMINIis true.Reviewer Test Plan
I ran:
Which ran successfully: https://github.com/google-gemini/gemini-cli/actions/runs/18412811531
Linked issues / bugs
Fixes #10517