-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add VertexAI integration tests #8853
base: main
Are you sure you want to change the base?
Conversation
|
Size Report 1Affected ProductsNo changes between base commit (5718838) and merge commit (6c1cabe).Test Logs |
|
||
# Vertex AI integration test Firebase project config | ||
packages/vertexai/integration/firebase-config.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just include this file with an empty object exported so that the IDE doesn't get mad, and if you run it locally, you overwrite it, and if you run it in CI, the workflow overwrites it. Maybe we should do this in e2e/ too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hsubox76 I did this, but it turns out that if it's tracked in git, changes will be tracked even if it's in the .gitignore. this means if someone updates this with the testing config, they may accidentally commit the change and upload it to git.
I believe we can't track this file with git while ignoring changes. I think we should just remove the file for now.
@@ -39,6 +39,7 @@ | |||
"test:ci": "yarn testsetup && node ../../scripts/run_tests_in_ci.js -s test", | |||
"test:skip-clone": "karma start", | |||
"test:browser": "yarn testsetup && karma start", | |||
"test:integration": "karma start --integration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to call this from "test" (line 38) if you want to run it on PRs or do you not want to do that yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to add this to test
since then it'll be ran when someone runs test
in the root directory- which is going to fail if someone hasn't defined the config that's used in these tests. Could be annoying for people working on other SDKs
Size Analysis Report 1Affected Products
Test Logs |
346de4e
to
7ad7833
Compare
Add integration tests using a secret config defined in
integration/firebase-config.ts
. I'm not using JSCore sandbox here because in the future we'll want to run these integration tests using a Firebase project that has access to APIs that aren't pubilc yet (which is also why the config is 'secret').When running tests locally, we can manually create a file that exports the firebase config. When running tests in CI, we'll have to add a step to write the config from a GH secret to a file using something like
echo "export const FIREBASE_CONFIG = '$(echo "$FIREBASE_CONFIG" | jq -r .)'" > packages/vertexai/integration/firebase-config.ts
.The next step is to get this running in CI on a daily CRON schedule, and in PRs that make changes to vertexAI.