Enhance CI for Samples: Build, Test, and Smoke Tests#766
Open
jacobsimionato wants to merge 6 commits intogoogle:mainfrom
Open
Enhance CI for Samples: Build, Test, and Smoke Tests#766jacobsimionato wants to merge 6 commits intogoogle:mainfrom
jacobsimionato wants to merge 6 commits intogoogle:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
The pull request significantly enhances the CI pipeline for samples across Angular, Lit, and Python Agents. The changes aim to provide more comprehensive validation, including full project coverage, runtime verification, and test automation, which is a crucial step towards preventing 'broken on arrival' samples. The specific change in samples/client/lit/package.json correctly integrates the component_gallery into the Lit workspaces, aligning with the stated goal of improving Lit sample coverage.
Note: Security Review has been skipped due to the limited scope of the PR.
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.
Analysis of Existing CI and Gaps
Previously, the CI for samples was focused primarily on a subset of projects and limited to build-time packaging, leaving several gaps:
contact,restaurant,rizzcharts,orchestrator). Critical projects like thea2a-chat-canvaslibrary,gallery, andlibwere never verified. Additionally, no unit tests were executed.contactandshellsamples but completely skipped thecomponent_gallery. No tests or type-checking were run for any Lit sample.uv buildfor ADK samples. This verified that they could be packaged but did not verify that they could actually start or that their imports were valid at runtime. The MCP demo was entirely omitted from CI.Improvements and Rationale
This PR addresses these gaps by implementing a more comprehensive validation strategy:
Angular Improvements
angular.json.ng buildwith minimal options to catch import errors early.npm run test(Karma/Jasmine) in headless mode to verify logic and component integrity.Lit Improvements
component_galleryto the top-level workspaces insamples/client/lit/package.json.npm run build:tsc --workspacesto verify TypeScript compilation across all samples.tests/smoke.test.tsin each sample workspace. These tests import the main application entry points and are executed via Node's test runner, ensuring that all dynamic and static imports resolve correctly in the final bundle.Python Agent Smoke Tests
samples/agent/mcp/to the CI trigger paths and build steps.uv run . --helpto all agents to verify CLI integrity.ContactAgent,OrchestratorAgent, etc.) that instantiates the agent and retrieves its Agent Card. This verifies that the agent logic, tool registration, and internal A2A/ADK dependencies are functional.These changes ensure that all samples are verified for both build-time packaging and runtime integrity, preventing 'broken on arrival' samples due to import errors or dependency mismatches.